summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-27 17:30:13 +0100
committerKeith Packard <keithp@keithp.com>2010-09-28 08:07:21 -0700
commitfdabcec57ae0fdc9910060609bb0848552c1db4d (patch)
tree641110dd0c91a63c5ccb5562d5c14f319b81598c
parent2f0abd7d690c3bcce2a80c093a0880f43e56d8cb (diff)
modes: Beware the driver switching root pixmaps
Program received signal SIGSEGV, Segmentation fault. 0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800, height=600, mmWidth=210, mmHeight=157) at ../../../../hw/xfree86/modes/xf86RandR12.c:731 731 ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory. in ../../../../hw/xfree86/modes/xf86RandR12.c (gdb) bt full height=600, mmWidth=210, mmHeight=157) at ../../../../hw/xfree86/modes/xf86RandR12.c:731 randrp = 0x8dcae68 pScrn = 0x8dbeb28 config = <value optimized out> pRoot = 0x8e08e30 pScrnPix = 0xb6d12008 ret = 1 c = <value optimized out> mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185 No locals. at ../../randr/rrscreen.c:307 pWin = 0x8e08e30 pScreen = 0x8dca3a0 i = <value optimized out> rc = 0 ../../randr/randr.c:485 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Julien Cristau <jcristau@debian.org> Tested-by: Julien Cristau <jcristau@debian.org> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/modes/xf86RandR12.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index dd2bdaca0..8a593a7e5 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -677,7 +677,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
WindowPtr pRoot = pScreen->root;
- PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
+ PixmapPtr pScrnPix;
Bool ret = FALSE;
int c;
@@ -714,6 +714,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
}
}
+ pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
pScreen->width = pScrnPix->drawable.width = width;
pScreen->height = pScrnPix->drawable.height = height;
randrp->mmWidth = pScreen->mmWidth = mmWidth;