[PATCH xf86-video-ati 2/2] Only call drmmode_validate_leases if RandR is enabled

Michel Dänzer michel at daenzer.net
Wed Jan 9 10:43:23 UTC 2019


From: Michel Dänzer <michel.daenzer at amd.com>

It would crash if RandR is disabled, e.g. because Xinerama is enabled.

Bugzilla: https://bugs.freedesktop.org/109230
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/drmmode_display.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index e04a17d5e..71f3539f6 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -3100,7 +3100,8 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
 	}
 
 	/* Validate leases on VT re-entry */
-	drmmode_validate_leases(pScrn);
+	if (dixPrivateKeyRegistered(rrPrivKey))
+	    drmmode_validate_leases(pScrn);
 
 	return TRUE;
 }
-- 
2.20.1



More information about the amd-gfx mailing list