Only call drmmode_validate_leases if RandR is enabled

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

Bugzilla: https://bugs.freedesktop.org/109230
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2019-01-09 11:26:14 +01:00
committed by Michel Dänzer
parent 38db1bbcfc
commit b1c01698f5

View File

@@ -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;
}