mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-07 08:34:01 +00:00
VidMode: prevent crash with no modes
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17431 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
committed by
Jeremy Huddleston
parent
c1bb8f43b9
commit
eeb21a133b
@@ -221,6 +221,9 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock)
|
||||
return FALSE;
|
||||
|
||||
pScrn = xf86Screens[scrnIndex];
|
||||
if (pScrn->modes == NULL)
|
||||
return FALSE;
|
||||
|
||||
pVidMode = VMPTR(pScrn->pScreen);
|
||||
pVidMode->First = pScrn->modes;
|
||||
pVidMode->Next = pVidMode->First->next;
|
||||
|
||||
Reference in New Issue
Block a user