Fix bounds checks and a nullptr check

This commit is contained in:
Johan Mattsson authored and GitHub committed 2022-02-03 21:42:12 +01:00
1 parent 66c9c99ed2
commit c00cc90b1f
5 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -1082,7 +1082,7 @@ void window_zoom_out(rct_window* w, bool atCursor)
void main_window_zoom(bool zoomIn, bool atCursor)
{
auto* mainWindow = window_get_main();
if (mainWindow != nullptr)
if (mainWindow == nullptr)
return;
if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)