xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Fri Mar 7 05:30:23 PST 2008


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

New commits:
commit 3fcb6445dc08f42488287162e3b7009d405e9c5b
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 7 08:29:49 2008 -0500

    Fix segfault when a monitor exists but has no modes.
    
    Thanks to Zhenyu Wang for finding this.

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 4d5d7b8..0bef5b4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -1678,6 +1678,9 @@ nextAspectMode(DisplayModePtr start, float aspect)
 {
     DisplayModePtr m = start;
 
+    if (!m)
+	return NULL;
+
     for (m = m->next; m; m = m->next)
 	if (aspectMatch(aspect, (float)m->HDisplay / (float)m->VDisplay))
 	    return m;


More information about the xorg-commit mailing list