]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Fix NULL pointer dereference when reconfiguring screens
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 12 Oct 2009 16:31:31 +0000 (18:31 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 12 Oct 2009 16:34:37 +0000 (18:34 +0200)
This did not happen all the time. It seems like you need to have a
container which is in stacking/tabbing mode on the screen which
is being reconfigured. (when doing xrandr --output VGA1 --off for
example)

src/handlers.c

index 354d0fa6107f033296bf1f520f1001e2fc6c3a02..7e08725b505fe74e04341f9f4b02d233e2b51bb1 100644 (file)
@@ -931,7 +931,7 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t *
         else {
                 uint32_t background_color;
                 /* Distinguish if the window is currently focused… */
-                if (CUR_CELL->currently_focused == client)
+                if (CUR_CELL != NULL && CUR_CELL->currently_focused == client)
                         background_color = config.client.focused.background;
                 /* …or if it is the focused window in a not focused container */
                 else background_color = config.client.focused_inactive.background;