xfree86: Only call PreInit handler if it exists for device
DoConfigure() attempts to call the PreInit handler on a device without checking that the handler exists. Check that the PreInit handler exists for a device before attempting to call it. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
e81031f3fd
commit
fd21b282dc
|
@ -774,7 +774,8 @@ DoConfigure(void)
|
|||
|
||||
ConfiguredMonitor = NULL;
|
||||
|
||||
if ((*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]],
|
||||
if ((*xf86Screens[dev2screen[j]]->PreInit) &&
|
||||
(*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]],
|
||||
PROBE_DETECT) &&
|
||||
ConfiguredMonitor) {
|
||||
monitor_ptr = configureDDCMonitorSection(j);
|
||||
|
|
Loading…
Reference in New Issue