diff options
author | matthijs <matthijs@openttd.org> | 2005-04-04 16:47:03 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2005-04-04 16:47:03 +0000 |
commit | fd394303b2ce2d20d6b9359bd66689449514c396 (patch) | |
tree | bcfa1105074f423e47db2457e639220a5377d0de /window.c | |
parent | facec3d922bc9a732fa3d9cf749fe4e61040c5f1 (diff) | |
download | openttd-fd394303b2ce2d20d6b9359bd66689449514c396.tar.xz |
(svn r2146) - Fix: [ 1175973 ] Crash if any key is pressed in startup (pkirchhofer)
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1280,8 +1280,11 @@ static void HandleKeypress(uint32 key) break; } - if (we.keypress.cont) - FindWindowById(WC_MAIN_TOOLBAR, 0)->wndproc(w, &we); + if (we.keypress.cont) { + w = FindWindowById(WC_MAIN_TOOLBAR, 0); + // When there is no toolbar w is null, check for that + if (w != NULL) w->wndproc(w, &we); + } } extern void UpdateTileSelection(void); |