xf86-video-intel: src/sna/sna_driver.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Dec 11 00:55:27 PST 2014


 src/sna/sna_driver.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit f587d71f3c91f9ddcc4cdbe8a0f9ce59590d9db2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Dec 11 08:53:54 2014 +0000

    sna: Catch NULL RandR screen private
    
    If Xinerama is enabled, than RandR12 will be silently disabled. Be
    careful not to dereference the rrScrPiv when it doesn't exist.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87207
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index d4acceb..8a3599c 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -1075,8 +1075,10 @@ sna_mode_init(struct sna *sna, ScreenPtr screen)
 
 	/* Wrap RR queries to catch pending MST topology changes */
 	rp = rrGetScrPriv(screen);
-	sna->mode.rrGetInfo = rp->rrGetInfo;
-	rp->rrGetInfo = sna_randr_getinfo;
+	if (rp) {
+		sna->mode.rrGetInfo = rp->rrGetInfo;
+		rp->rrGetInfo = sna_randr_getinfo;
+	}
 
 	return TRUE;
 }


More information about the xorg-commit mailing list