Commit 7a0555e9 authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Adam Jackson
Browse files

Fix crash in xf86InitOrigins()

In a multihead setup, if only the first screen can be
initialized, but the second screen is mentioned first in the
ServerLayout section, the xf86InitOrigins() function will crash
because the screen referred to in the e.g. "RightOf" part is
non-existent.
parent 5b41d4e6
......@@ -558,6 +558,14 @@ xf86InitOrigins(void)
screen = &xf86ConfigLayout.screens[i];
if (screen->refscreen != NULL &&
screen->refscreen->screennum >= xf86NumScreens) {
screensLeft &= ~(1 << i);
xf86Msg(X_WARNING, "Not including screen \"%s\" in origins calculation.\n",
screen->screen->id);
continue;
}
switch(screen->where) {
case PosObsolete:
OldStyleConfig = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment