(svn r2146) - Fix: [ 1175973 ] Crash if any key is pressed in startup (pkirchhofer)
authormatthijs
Mon, 04 Apr 2005 16:47:03 +0000
changeset 1642 593a9b750b91
parent 1641 347f9aaa10f6
child 1643 d38655053062
(svn r2146) - Fix: [ 1175973 ] Crash if any key is pressed in startup (pkirchhofer)
window.c
--- a/window.c	Sun Apr 03 20:44:14 2005 +0000
+++ b/window.c	Mon Apr 04 16:47:03 2005 +0000
@@ -1280,8 +1280,11 @@
 			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);