From: Michel Dänzer <[email protected]>

E.g. becuase Xinerama is enabled.

Fixes crash on server startup when RandR is disabled and all other
conditions in xf86_crtc_supports_gamma are satisfied.

Bugzilla: https://bugs.freedesktop.org/100293
Signed-off-by: Michel Dänzer <[email protected]>
---
 hw/xfree86/modes/xf86Crtc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 3f9857b4a..9ce303de7 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -3405,7 +3405,8 @@ xf86_crtc_notify(ScreenPtr screen)
 Bool
 xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
 {
-    if (xf86CrtcConfigPrivateIndex != -1) {
+    if (dixPrivateKeyRegistered(rrPrivKey) &&
+        xf86CrtcConfigPrivateIndex != -1) {
         xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
         xf86CrtcPtr crtc;
 
-- 
2.11.0

_______________________________________________
[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