Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo,
which later calls RRFirstOutput.

Signed-off-by: Ricardo Salveti de Araujo <[email protected]>
---
 randr/randr.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/randr/randr.c b/randr/randr.c
index 4d4298a..103da48 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -446,6 +446,9 @@ RRFirstOutput(ScreenPtr pScreen)
     RROutputPtr output;
     int i, j;
 
+    if (!pScrPriv)
+        return NULL;
+
     if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
         return pScrPriv->primaryOutput;
 
-- 
1.7.9.5

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to