xserver: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Thu Jul 3 02:05:39 PDT 2008


 hw/xfree86/modes/xf86Crtc.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1771edcb44b564f83f509748b4e4cd5b7586e2a8
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Jul 3 18:57:09 2008 +1000

    modes: check the crtc is valid before using its desired modes.
    
    this fixes a crash I was getting on radeon rotate when gnome is running.
    I'm sure g-s-d was doing something bad, but really not crashing ftw.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 5a71bcf..733106c 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1714,9 +1714,11 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
     /* Set scrn->modes to the mode list for the 'compat' output */
     scrn->modes = xf86DuplicateModes(scrn, output->probed_modes);
 
-    for (mode = scrn->modes; mode; mode = mode->next)
-	if (xf86ModesEqual (mode, &crtc->desiredMode))
-	    break;
+    if (crtc) {
+	for (mode = scrn->modes; mode; mode = mode->next)
+	    if (xf86ModesEqual (mode, &crtc->desiredMode))
+		break;
+    }
 
     if (scrn->modes != NULL) {
 	/* For some reason, scrn->modes is circular, unlike the other mode


More information about the xorg-commit mailing list