x11: Add window test before accessing reparents_pending field

https://gitlab.gnome.org/GNOME/mutter/merge_requests/768
This commit is contained in:
Rémi Bernon 2019-09-02 18:22:40 +02:00
parent 8f242f8bf0
commit fdda8adfcf
No known key found for this signature in database
GPG Key ID: 38D0E5827B54E5C9

View File

@ -1437,7 +1437,7 @@ handle_other_xevent (MetaX11Display *x11_display,
break; break;
case ReparentNotify: case ReparentNotify:
{ {
if (window->reparents_pending > 0) if (window && window->reparents_pending > 0)
window->reparents_pending -= 1; window->reparents_pending -= 1;
if (event->xreparent.event == x11_display->xroot) if (event->xreparent.event == x11_display->xroot)
meta_stack_tracker_reparent_event (display->stack_tracker, meta_stack_tracker_reparent_event (display->stack_tracker,