mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 22:20:06 +01:00
randr: Bail from RRTellChanged if there's no root window yet
This can happen if RRTellChanged is called during initialization.
Continuing in that case makes no sense conceptually:
* Any event sent over the wire requires a corresponding window.
* No root window probably means there can't be any clients which could
receive the events.
In practice, it would result in a crash down the road due to
dereferencing the NULL ScreenRec::root pointer.
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit a6d178b6af)
This commit is contained in:
parent
bfd7e302fc
commit
96829a7b19
1 changed files with 4 additions and 0 deletions
|
|
@ -615,6 +615,10 @@ RRTellChanged(ScreenPtr pScreen)
|
|||
primarysp = pScrPriv;
|
||||
}
|
||||
|
||||
/* If there's no root window yet, can't send events */
|
||||
if (!primary->root)
|
||||
return;
|
||||
|
||||
xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) {
|
||||
pSecondaryScrPriv = rrGetScrPriv(iter);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue