xserver: Branch 'master'
Kristian Høgsberg
krh at kemper.freedesktop.org
Mon Dec 1 09:42:05 PST 2008
hw/xfree86/modes/xf86Crtc.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 09df7cc5ad7b72d8a23c3e22fc718aad8c16f4d3
Author: Kristian Høgsberg <krh at redhat.com>
Date: Mon Dec 1 12:41:10 2008 -0500
Avoid dereferencing NULL pScreen in xf86CrtcSetModeTransform().
We can get there during PreInit as we set a mode for load detection.
At that time there's no pScreen anywhere, so just skip the optimization
then.
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 6a3731c..0c06915 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -294,10 +294,14 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati
} else
crtc->transformPresent = FALSE;
- /* xf86CrtcFitsScreen() relies on these values being correct. */
- /* This should ensure the values are always set at modeset time. */
- pScreen->width = scrn->virtualX;
- pScreen->height = scrn->virtualY;
+ /* We may hit this path during PreInit during load-detcect, at
+ * which point no pScreens exist yet, so avoid this step. */
+ if (pScreen) {
+ /* xf86CrtcFitsScreen() relies on these values being correct. */
+ /* This should ensure the values are always set at modeset time. */
+ pScreen->width = scrn->virtualX;
+ pScreen->height = scrn->virtualY;
+ }
/* Shift offsets that move us out of virtual size */
if (x + mode->HDisplay > xf86_config->maxWidth ||
More information about the xorg-commit
mailing list