28 lines
869 B
Diff
28 lines
869 B
Diff
commit f6401f944d327cc5d9a7ee0bbdf4f7fc8eaa31e8
|
|
Author: Matthias Hopf <mhopf@suse.de>
|
|
Date: Fri Nov 23 16:12:49 2007 +0100
|
|
|
|
Don't segfault if referring to a relative output where no modes survived.
|
|
|
|
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
|
index 5a1ed8c..8595d96 100644
|
|
--- a/hw/xfree86/modes/xf86Crtc.c
|
|
+++ b/hw/xfree86/modes/xf86Crtc.c
|
|
@@ -1079,6 +1079,16 @@ xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
|
|
any_set = TRUE;
|
|
continue;
|
|
}
|
|
+ if (!modes[or])
|
|
+ {
|
|
+ xf86DrvMsg (scrn->scrnIndex, X_ERROR,
|
|
+ "Cannot position output %s relative to output %s without modes\n",
|
|
+ output->name, relative_name);
|
|
+ output->initial_x = 0;
|
|
+ output->initial_y = 0;
|
|
+ any_set = TRUE;
|
|
+ continue;
|
|
+ }
|
|
if (relative->initial_x == POSITION_UNSET)
|
|
{
|
|
keep_going = TRUE;
|