RRScreenSizeNotify() will update the connection information block, but
if this occurs during initialization before ConnectionInfo is even
initialized, this will lead to a crash.

Simply check for ConnectionInfo prior to update it to avoid the crash.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337
Signed-off-by: Olivier Fourdan <[email protected]>
---
 randr/rrscreen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index d0ca91e..51cb966 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -148,7 +148,8 @@ RRScreenSizeNotify(ScreenPtr pScreen)
 
     RRTellChanged(pScreen);
     RRSendConfigNotify(pScreen);
-    RREditConnectionInfo(pScreen);
+    if (ConnectionInfo)
+        RREditConnectionInfo(pScreen);
 
     RRPointerScreenConfigured(pScreen);
     /*
-- 
2.7.4

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

Reply via email to