diff --git a/src/openrct2/windows/top_toolbar.c b/src/openrct2/windows/top_toolbar.c index ae57bf505a..714574cd63 100644 --- a/src/openrct2/windows/top_toolbar.c +++ b/src/openrct2/windows/top_toolbar.c @@ -1021,7 +1021,7 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, sint16 widgetIndex) { sint32 entryIndex = mapElement->properties.scenery.type; rct_scenery_entry * sceneryEntry = get_small_scenery_entry(entryIndex); - if (sceneryEntry != NULL || sceneryEntry != (rct_scenery_entry *)-1) { + if (sceneryEntry != NULL && sceneryEntry != (rct_scenery_entry *)-1) { sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_SMALL_SCENERY, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryRotation = (get_current_rotation() + map_element_get_direction(mapElement)) & 3; @@ -1036,7 +1036,7 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, sint16 widgetIndex) { sint32 entryIndex = mapElement->properties.wall.type; rct_scenery_entry * sceneryEntry = get_wall_entry(entryIndex); - if (sceneryEntry != NULL || sceneryEntry != (rct_scenery_entry *)-1) { + if (sceneryEntry != NULL && sceneryEntry != (rct_scenery_entry *)-1) { sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_WALLS, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryPrimaryColour = mapElement->properties.wall.colour_1 & 0x1F; @@ -1051,7 +1051,7 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, sint16 widgetIndex) { sint32 entryIndex = mapElement->properties.scenerymultiple.type & MAP_ELEMENT_LARGE_TYPE_MASK; rct_scenery_entry * sceneryEntry = get_large_scenery_entry(entryIndex); - if (sceneryEntry != NULL || sceneryEntry != (rct_scenery_entry *)-1) { + if (sceneryEntry != NULL && sceneryEntry != (rct_scenery_entry *)-1) { sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_LARGE_SCENERY, entryIndex); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryRotation = (get_current_rotation() + map_element_get_direction(mapElement)) & 3; @@ -1067,7 +1067,7 @@ static void scenery_eyedropper_tool_down(sint16 x, sint16 y, sint16 widgetIndex) sint32 bannerIndex = mapElement->properties.banner.index; rct_banner *banner = &gBanners[bannerIndex]; rct_scenery_entry * sceneryEntry = get_banner_entry(banner->type); - if (sceneryEntry != NULL || sceneryEntry != (rct_scenery_entry *)-1) { + if (sceneryEntry != NULL && sceneryEntry != (rct_scenery_entry *)-1) { sint32 sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_BANNERS, banner->type); if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId)) { gWindowSceneryEyedropperEnabled = false;