[mutter/gnome-40] wayland/subsurface: Check for parent actor before unparenting
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-40] wayland/subsurface: Check for parent actor before unparenting
- Date: Fri, 3 Sep 2021 09:44:14 +0000 (UTC)
commit af5fae51f6b98613ff8c152f4ad48a84ac8cdc22
Author: Robert Mader <robert mader posteo de>
Date: Fri Aug 6 13:12:26 2021 +0200
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>
src/wayland/meta-wayland-subsurface.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c
index d7f56b66e8..9f32094766 100644
--- a/src/wayland/meta-wayland-subsurface.c
+++ b/src/wayland/meta-wayland-subsurface.c
@@ -303,7 +303,8 @@ unparent_actor (MetaWaylandSurface *surface)
return;
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]