[mutter] wayland/subsurface: Check for parent actor before unparenting
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/subsurface: Check for parent actor before unparenting
- Date: Thu, 2 Sep 2021 21:41:19 +0000 (UTC)
commit 2a2f9300d075346883a9d1a3681c347795e5e795
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]