diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 46f2211b4..882ab66a2 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -842,7 +842,7 @@ xf86CompatOutput(ScrnInfoPtr pScrn) if (xf86CrtcConfigPrivateIndex == -1) return NULL; config = XF86_CRTC_CONFIG_PTR(pScrn); - if (config->compat_output < 0) + if ((config == NULL) || (config->compat_output < 0)) return NULL; return config->output[config->compat_output]; }