mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
wayland/subsurface: Check for parent actor before unparenting
No need to assume the actor still has a parent. This silences warnings in normal builds and prevents a crash in fully optimized ones. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1958>
This commit is contained in:
parent
d17e9adc73
commit
2a2f9300d0
@ -303,6 +303,7 @@ unparent_actor (MetaWaylandSurface *surface)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
parent_actor = clutter_actor_get_parent (actor);
|
parent_actor = clutter_actor_get_parent (actor);
|
||||||
|
if (parent_actor)
|
||||||
clutter_actor_remove_child (parent_actor, actor);
|
clutter_actor_remove_child (parent_actor, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user