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>
This commit is contained in:
parent
04a09d353f
commit
f587d71f3c
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue