Correct a NULL pointer deference
The problem happens if Monitor/Card combo doesn't provide EDID info, and the XFree86-VidModeExtension extension is used. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
This commit is contained in:
parent
3a1278907e
commit
c8af7ce35a
|
@ -150,10 +150,14 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock)
|
|||
return FALSE;
|
||||
|
||||
pScrn = xf86Screens[scrnIndex];
|
||||
|
||||
if (pScrn->currentMode) {
|
||||
*mode = (pointer)(pScrn->currentMode);
|
||||
*dotClock = pScrn->currentMode->Clock;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
_X_EXPORT int
|
||||
|
|
Loading…
Reference in New Issue
Block a user