Comment 10 for bug 300310

Revision history for this message
In , Frans Pop (elendil) wrote :

The proposed patch fails to compile for me with Debian's xserver-xorg package (1.4.2) as the pVidMode struct does not have a modes variable.

I tried the following instead and with that I no longer got the crash in a quick first test:
     pScrn = xf86Screens[scrnIndex];
     pVidMode = VMPTR(pScrn->pScreen);
+ if (pScrn->modes == NULL)
+ return FALSE;
+
     pVidMode->First = pScrn->modes;
     pVidMode->Next = pVidMode->First->next;

On IRC Julien Cristau confirmed that this should be correct.