summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-surface.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2017-04-17 13:27:35 +0800
committerJonas Ådahl <jadahl@gmail.com>2017-04-21 17:46:17 +0800
commit704bd4c33129ea50b14493d6cbd6aca4db827f36 (patch)
tree4a7b4b649923c1a72613e0c50869effebf35e36d /src/wayland/meta-wayland-surface.c
parent229ac9c9dcc9fe8a1462c742ba1776e090bc37a1 (diff)
downloadmutter-704bd4c33129ea50b14493d6cbd6aca4db827f36.tar.gz
wayland/subsurface: Handle clients committing on destroyed subsurface
A client can still commit state to a destroyed subsurface. It wont update anything on the screen, since the subsurface will not be visible, but mutter should still handle it and not crash. https://bugzilla.gnome.org/show_bug.cgi?id=781391
Diffstat (limited to 'src/wayland/meta-wayland-surface.c')
-rw-r--r--src/wayland/meta-wayland-surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 332374244..5a0e0ee15 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -615,7 +615,7 @@ subsurface_role_get_toplevel (MetaWaylandSurfaceRole *surface_role)
meta_wayland_surface_role_get_surface (surface_role);
MetaWaylandSurface *parent = surface->sub.parent;
- if (parent->role)
+ if (parent && parent->role)
return meta_wayland_surface_role_get_toplevel (parent->role);
else
return NULL;