From 15ae35894619f4cbd5fd441e348b83753ec6c503 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Sun, 27 May 2018 18:03:34 +0200 Subject: [PATCH] Fix #7569: Assertion hit when using the XY spinners (#7570) The X/Y spinners change the currently tile selected, and reset the element selection index. Previously this would also set the page to default immediately, but since that's now done on invalidation instead, the page would not be correct. This is fixed by checking the index of the selected element too, instead of only the selected page, in the mouse_up event. --- src/openrct2-ui/windows/TileInspector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index e2e1088f00..992fde8862 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -991,7 +991,7 @@ static void window_tile_inspector_mouseup(rct_window *w, rct_widgetindex widgetI } // Only element-specific widgets from now on - if (w->page == TILE_INSPECTOR_PAGE_DEFAULT) { + if (w->selected_list_item == TILE_INSPECTOR_PAGE_DEFAULT || w->selected_list_item == -1) { return; }