From a3c97ee53598d916267dc19e6f94eeb057a1e779 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 30 Jun 2019 15:03:32 +0200 Subject: surface-actor-wayland: Handle stex being disposed As the MetaShapedTexture might already got finalized, this can lead to a crash. https://gitlab.gnome.org/GNOME/mutter/merge_requests/755 --- src/compositor/meta-surface-actor-wayland.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c index 27c600c59..1c933d554 100644 --- a/src/compositor/meta-surface-actor-wayland.c +++ b/src/compositor/meta-surface-actor-wayland.c @@ -131,10 +131,12 @@ meta_surface_actor_wayland_dispose (GObject *object) { MetaSurfaceActorWayland *self = META_SURFACE_ACTOR_WAYLAND (object); MetaWaylandFrameCallback *cb, *next; - MetaShapedTexture *stex = - meta_surface_actor_get_texture (META_SURFACE_ACTOR (self)); + MetaShapedTexture *stex; + + stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self)); + if (stex) + meta_shaped_texture_set_texture (stex, NULL); - meta_shaped_texture_set_texture (stex, NULL); if (self->surface) { g_object_remove_weak_pointer (G_OBJECT (self->surface), -- cgit v1.2.1