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;