summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86VidMode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c
index 4dd454d8b..2ae5484e3 100644
--- a/hw/xfree86/common/xf86VidMode.c
+++ b/hw/xfree86/common/xf86VidMode.c
@@ -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;