[gtk] wayland/surface: Fix crash when unexporting



commit 0e55f7a52fb2ad119384556fc61bac98d2bb3a5f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Oct 1 16:13:43 2019 -0300

    wayland/surface: Fix crash when unexporting
    
    This is the exact same problem of 655c9dd526.

 gdk/wayland/gdksurface-wayland.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index aed4489c7c..80e12e29ce 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -4184,8 +4184,11 @@ gdk_wayland_surface_unexport_handle (GdkSurface *surface)
 
   g_clear_pointer (&impl->display_server.xdg_exported,
                    zxdg_exported_v1_destroy);
-  g_clear_pointer (&impl->exported.user_data,
-                   impl->exported.destroy_func);
+  if (impl->exported.destroy_func)
+    {
+      g_clear_pointer (&impl->exported.user_data,
+                       impl->exported.destroy_func);
+    }
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]