From: Michael Stapelberg Date: Mon, 12 Oct 2009 16:31:31 +0000 (+0200) Subject: Bugfix: Fix NULL pointer dereference when reconfiguring screens X-Git-Tag: 3.d~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=04884ab8cdc2cb0d17fc5bfdd13ad0660074dc40;p=i3%2Fi3 Bugfix: Fix NULL pointer dereference when reconfiguring screens 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) --- diff --git a/src/handlers.c b/src/handlers.c index 5b456fb7..d4e04b68 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -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;