[mutter] surface-actor-wayland: Handle stex being disposed
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] surface-actor-wayland: Handle stex being disposed
- Date: Tue, 27 Aug 2019 09:09:29 +0000 (UTC)
commit a3c97ee53598d916267dc19e6f94eeb057a1e779
Author: Robert Mader <robert mader posteo de>
Date: Sun Jun 30 15:03:32 2019 +0200
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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]