]> 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:31:31 +0000 (18:31 +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 5b456fb718dfb78456fcb16f66f55498dc9c7f0a..d4e04b68aa596ea0f607c2303820c7473f9ed055 100644 (file)
@@ -719,7 +719,7 @@ int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t *
                 if (client->urgent)
                         background_color = config.client.urgent.background;
                 /* Distinguish if the window is currently focused… */
-                else if (CUR_CELL->currently_focused == client)
+                else 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;