[mutter/gnome-3-36] wayland/subsurface: Add check for parent surface



commit d2747a12882776c5a655c7fa7beefb39ee6f17b2
Author: Robert Mader <robert mader posteo de>
Date:   Sun Aug 23 20:13:56 2020 +0000

    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
    
    
    (cherry picked from commit 8cbcd35fdf9d0aa08e62405c89fe83522aa29cd3)

 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 efa1da1b67..3eb0ae289e 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]