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,7 +303,8 @@ unparent_actor (MetaWaylandSurface *surface)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
parent_actor = clutter_actor_get_parent (actor);
|
parent_actor = clutter_actor_get_parent (actor);
|
||||||
clutter_actor_remove_child (parent_actor, actor);
|
if (parent_actor)
|
||||||
|
clutter_actor_remove_child (parent_actor, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user