[gtk+] wayland: Be more careful when destroying windows



commit 0dc6726f021cc28413943cf0686063c4cbbe1d27
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Aug 28 13:55:23 2015 -0400

    wayland: Be more careful when destroying windows
    
    We call gdk_wayland_window_hide_surface when the window gets
    destroyed, and in this case, the frame clock might not exist
    anymore.
    
    This was showing up in the displayclose testcase.

 gdk/wayland/gdkwindow-wayland.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index afebcd3..9190d47 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1345,8 +1345,12 @@ gdk_wayland_window_hide_surface (GdkWindow *window)
 
       if (impl->awaiting_frame)
         {
+          GdkFrameClock *frame_clock;
+
           impl->awaiting_frame = FALSE;
-          _gdk_frame_clock_thaw (gdk_window_get_frame_clock (window));
+          frame_clock = gdk_window_get_frame_clock (window);
+          if (frame_clock)
+            _gdk_frame_clock_thaw (frame_clock);
         }
 
       if (impl->gtk_surface)


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