From dc3804bfa2b1dc1baf661f62f10d4a2b1ddb1e4e Mon Sep 17 00:00:00 2001 From: Duncan Frost Date: Fri, 23 May 2014 11:28:35 +0100 Subject: [PATCH] Fixes one of the issues of #121 but 526 cannot be easily fixed --- projects/openrct2.vcxproj | 2 +- src/game.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/openrct2.vcxproj b/projects/openrct2.vcxproj index b1c490f757..9e85fc8eb7 100644 --- a/projects/openrct2.vcxproj +++ b/projects/openrct2.vcxproj @@ -193,4 +193,4 @@ - + \ No newline at end of file diff --git a/src/game.c b/src/game.c index 945d1f7dc9..55cb5728d5 100644 --- a/src/game.c +++ b/src/game.c @@ -629,7 +629,6 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) if (w != NULL) { windowClass = w->classification; windowNumber = w->number; - widget = &w->widgets[widgetIndex]; } window_close_by_id(WC_ERROR, 0); @@ -643,6 +642,8 @@ static void input_leftmousedown(int x, int y, rct_window *w, int widgetIndex) if (widgetIndex == -1) return; + widget = &w->widgets[widgetIndex]; + switch (widget->type) { case WWT_FRAME: case WWT_RESIZE: