diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index d855bd1..2af8c00 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -226,6 +226,9 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) pScrn = xf86Screens[scrnIndex]; pVidMode = VMPTR(pScrn->pScreen); + if (pVidMode->modes == NULL) + return FALSE; + pVidMode->First = pScrn->modes; pVidMode->Next = pVidMode->First->next;