forked from rosebudai/OpenRCT2-Web
Guard against possible NULL dereference
This commit is contained in:
1 parent
680bb0c52b
commit
0cdaa0b57e
1 file changed
+3
-2
+3
-2
@@ -1250,8 +1250,9 @@ static void input_update_tooltip(rct_window *w, int widgetIndex, int x, int y)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_WINDOW_CLASS, rct_windowclass) != w->classification ||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_WINDOW_NUMBER, rct_windownumber) != w->number ||
|
||||
if (((w != NULL) &&
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_WINDOW_CLASS, rct_windowclass) != w->classification ||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_WINDOW_NUMBER, rct_windownumber) != w->number)) ||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_WIDGET_INDEX, uint16) != widgetIndex
|
||||
) {
|
||||
window_tooltip_close();
|
||||
|
||||
Reference in new issue
Block a user