diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-11 08:53:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-12-11 08:53:54 +0000 |
commit | f587d71f3c91f9ddcc4cdbe8a0f9ce59590d9db2 (patch) | |
tree | 02664a92d378bcb67275cd2ce24ab911ed36ec23 /src | |
parent | 04a09d353fc5ad8a55eb2457dc8bb43638ba879e (diff) |
sna: Catch NULL RandR screen private
If Xinerama is enabled, than RandR12 will be silently disabled. Be
careful not to dereference the rrScrPiv when it doesn't exist.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87207
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_driver.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index d4accebf..8a3599c7 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -1075,8 +1075,10 @@ sna_mode_init(struct sna *sna, ScreenPtr screen) /* Wrap RR queries to catch pending MST topology changes */ rp = rrGetScrPriv(screen); - sna->mode.rrGetInfo = rp->rrGetInfo; - rp->rrGetInfo = sna_randr_getinfo; + if (rp) { + sna->mode.rrGetInfo = rp->rrGetInfo; + rp->rrGetInfo = sna_randr_getinfo; + } return TRUE; } |