Bugfix: Fix NULL pointer dereference in workspaces which have preferred screens but were not used yet (Thanks badboy)

This commit is contained in:
Michael Stapelberg 2009-12-23 00:39:03 +01:00
parent 3e53ecf69e
commit ba82a3e63b
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ void xinerama_requery_screens(xcb_connection_t *conn) {
/* Check for workspaces which need to be assigned to specific screens /* Check for workspaces which need to be assigned to specific screens
* which may now be available */ * which may now be available */
TAILQ_FOREACH(ws, workspaces, workspaces) { TAILQ_FOREACH(ws, workspaces, workspaces) {
if (ws->preferred_screen == NULL) if (ws->preferred_screen == NULL || ws->screen == NULL)
continue; continue;
workspace_initialize(ws, ws->screen, true); workspace_initialize(ws, ws->screen, true);