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.
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: scrnIndex] ; >pScreen) ; >First = pScrn->modes; >First- >next;
pScrn = xf86Screens[
pVidMode = VMPTR(pScrn-
+ if (pScrn->modes == NULL)
+ return FALSE;
+
pVidMode-
pVidMode->Next = pVidMode-
On IRC Julien Cristau confirmed that this should be correct.