]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Don’t crash if the user didn’t click into a client
authorMichael Stapelberg <michael+git@stapelberg.de>
Wed, 11 Feb 2009 18:04:28 +0000 (19:04 +0100)
committerMichael Stapelberg <michael+git@stapelberg.de>
Wed, 11 Feb 2009 18:04:28 +0000 (19:04 +0100)
mainx.c

diff --git a/mainx.c b/mainx.c
index 15fd3cc64047e40b2ca1dffcc8e566ae7a01718e..f44816dcb49854c8f3bdca377bd0e1ccf744ba2e 100644 (file)
--- 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);