From f2bfaa06a4e5050a8c09c8179af94027181bf731 Mon Sep 17 00:00:00 2001 From: Duncan Frost Date: Sat, 21 Jun 2014 21:37:32 +0100 Subject: [PATCH] Fixes #179 multiple handyman crash. --- src/window.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/window.c b/src/window.c index adc300a31c..541601a529 100644 --- a/src/window.c +++ b/src/window.c @@ -336,9 +336,8 @@ static void window_all_wheel_input() rct_window *window_create(int x, int y, int width, int height, uint32 *event_handlers, rct_windowclass cls, uint16 flags) { rct_window *w; - // Check if there are any window slots left - if (RCT2_NEW_WINDOW == &(RCT2_FIRST_WINDOW[12])) { + if (RCT2_NEW_WINDOW >= &(RCT2_FIRST_WINDOW[11])) { // Close least recently used window for (w = RCT2_FIRST_WINDOW; w < RCT2_NEW_WINDOW; w++) if (!(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT | WF_9)))