From be710aa311f385827f7d4ac1773971d575353d3b Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@linux.ie>
Date: Wed, 15 Apr 2009 18:26:06 +1000
Subject: [PATCH] randr12: looking up these bits if randr isn't initialised is bad.
With xinerama enabled I get a segfault in here, this might not
be the right answer.
---
hw/xfree86/modes/xf86RandR12.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index dacb5d2..ac066a8 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -754,8 +754,8 @@ Bool
xf86RandR12CreateScreenResources (ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
- XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ xf86CrtcConfigPtr config;
+ XF86RandRInfoPtr randrp;
int c;
int width, height;
int mmWidth, mmHeight;
@@ -765,6 +765,8 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
return TRUE;
#endif
+ config = XF86_CRTC_CONFIG_PTR(pScrn);
+ randrp = XF86RANDRINFO(pScreen);
/*
* Compute size of screen
*/
--
1.6.0.6