[mutter] wayland/subsurface: Add check for parent surface



commit 8cbcd35fdf9d0aa08e62405c89fe83522aa29cd3
Author: Robert Mader <robert mader posteo de>
Date:   Sun Aug 23 22:13:56 2020 +0200

    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 56e4ca97c6..bf14e0e3c9 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]