From 8cbcd35fdf9d0aa08e62405c89fe83522aa29cd3 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 23 Aug 2020 22:13:56 +0200 Subject: [PATCH] wayland/subsurface: Add check for parent surface Just as we do in similar places. This avoids crashes under certain circumstances. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1411 --- 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 56e4ca97c..bf14e0e3c 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -275,7 +275,8 @@ meta_wayland_subsurface_notify_subsurface_state_changed (MetaWaylandSurfaceRole meta_wayland_surface_role_get_surface (surface_role); MetaWaylandSurface *parent = surface->sub.parent; - return meta_wayland_surface_notify_subsurface_state_changed (parent); + if (parent) + return meta_wayland_surface_notify_subsurface_state_changed (parent); } static double