mirror of https://github.com/OpenRCT2/OpenRCT2.git
widget_index is sint16, make sure the check is valid (#3335)
This commit is contained in:
parent
0286efc546
commit
e9bf2a742f
|
@ -1803,7 +1803,7 @@ void tool_cancel()
|
|||
// Reset map selection
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) = 0;
|
||||
|
||||
if (gCurrentToolWidget.widget_index != 0xFFFF) {
|
||||
if (gCurrentToolWidget.widget_index != -1) {
|
||||
// Invalidate tool widget
|
||||
widget_invalidate_by_number(
|
||||
gCurrentToolWidget.window_classification,
|
||||
|
|
Loading…
Reference in New Issue