Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / 232-xf86compatoutput-valgrind.patch
CommitLineData
7217e0ca
ML
1diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
2index 802303f..6e80210 100644
3--- a/hw/xfree86/modes/xf86Crtc.h
4+++ b/hw/xfree86/modes/xf86Crtc.h
5@@ -730,6 +730,8 @@ static _X_INLINE xf86OutputPtr
6 xf86CompatOutput(ScrnInfoPtr pScrn)
7 {
8 xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
9+ if (config->compat_output < 0)
10+ return NULL;
11
12 return config->output[config->compat_output];
13 }