From: Michael Stapelberg Date: Wed, 11 Feb 2009 18:04:28 +0000 (+0100) Subject: Bugfix: Don’t crash if the user didn’t click into a client X-Git-Tag: 3.a~203 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f9981f09f1c1ed5325aa9f64c2a5b8bf71513545;p=i3%2Fi3 Bugfix: Don’t crash if the user didn’t click into a client --- diff --git a/mainx.c b/mainx.c index 15fd3cc6..f44816dc 100644 --- a/mainx.c +++ b/mainx.c @@ -1054,6 +1054,8 @@ static int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button printf("button press!\n"); /* This was either a focus for a client’s parent (= titlebar)… */ Client *client = table_get(byChild, event->event); + if (client == NULL) + return 1; printf("gots win %08x\n", client);