randr: Fix a crash on initialization with GPU screens
RRSetChanged (immediately above) was immune to screens with no master, but RRTellChanged was not: Thread 1 "X" received signal SIGSEGV, Segmentation fault. RRTellChanged (pScreen=<optimized out>) at ../../randr/randr.c:576 576 mastersp = rrGetScrPriv(master); (gdb) bt #0 RRTellChanged (pScreen=<optimized out>) at ../../randr/randr.c:576 #1 0x000055555566f1e9 in RRNoticePropertyChange (value=0x555555bfbf28, property=70, output=0x555555bfef10) at ../../randr/rrproperty.c:153 #2 RRChangeOutputProperty (output=output@entry=0x555555bfef10, property=<optimized out>, type=type@entry=19, format=format@entry=32, mode=<optimized out>, mode@entry=0, len=len@entry=1, value=0x7fffffffe77c, sendevent=1, pending=0) at ../../randr/rrproperty.c:263 #3 0x000055555566dba5 in RROutputSetNonDesktop (output=output@entry=0x555555bfef10, nonDesktop=nonDesktop@entry=0) at ../../randr/rroutput.c:333 ... Reported-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
cf485c659d
commit
2af0a50a4b
|
@ -602,6 +602,8 @@ RRTellChanged(ScreenPtr pScreen)
|
|||
|
||||
if (pScreen->isGPU) {
|
||||
master = pScreen->current_master;
|
||||
if (!master)
|
||||
return;
|
||||
mastersp = rrGetScrPriv(master);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user