From: Michael Stapelberg Date: Tue, 22 Dec 2009 23:39:03 +0000 (+0100) Subject: Bugfix: Fix NULL pointer dereference in workspaces which have preferred screens but... X-Git-Tag: 3.e~6^2~186 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ba82a3e63bfefcccef560155fbafc1f2d8a66bc2;p=i3%2Fi3 Bugfix: Fix NULL pointer dereference in workspaces which have preferred screens but were not used yet (Thanks badboy) --- diff --git a/src/xinerama.c b/src/xinerama.c index 81359ec2..15e8b0a3 100644 --- a/src/xinerama.c +++ b/src/xinerama.c @@ -425,7 +425,7 @@ void xinerama_requery_screens(xcb_connection_t *conn) { /* Check for workspaces which need to be assigned to specific screens * which may now be available */ TAILQ_FOREACH(ws, workspaces, workspaces) { - if (ws->preferred_screen == NULL) + if (ws->preferred_screen == NULL || ws->screen == NULL) continue; workspace_initialize(ws, ws->screen, true);