summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-07-13 15:02:22 +0000
committertruelight <truelight@openttd.org>2007-07-13 15:02:22 +0000
commit73e2c46e8a35911267d5686cd3e4dd1b22ce3fc2 (patch)
tree9980943a19d393c04269ca5d40811ba1866ed2c7 /src
parent4b818368b10d8e741e577069e34b098e18224fb2 (diff)
downloadopenttd-73e2c46e8a35911267d5686cd3e4dd1b22ce3fc2.tar.xz
(svn r10548) -Fix [FS#1020]: don't segfault when you quit in the end-of-the-game screen
Diffstat (limited to 'src')
-rw-r--r--src/main_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 645329c72..8c06ccacd 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -1700,7 +1700,7 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
}
case WE_MESSAGE:
- HandleZoomMessage(w, FindWindowById(WC_MAIN_WINDOW, 0)->viewport, 17, 18);
+ if (FindWindowById(WC_MAIN_WINDOW, 0) != NULL) HandleZoomMessage(w, FindWindowById(WC_MAIN_WINDOW, 0)->viewport, 17, 18);
break;
}
}