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:
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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user