[gtk+] Fix warning with event compression on a destroyed window



commit fbfeb00545680019c66c71a211ead8def73bf98e
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Nov 11 18:17:38 2013 -0500

    Fix warning with event compression on a destroyed window
    
    Fix a critical message when we try to compress events for a window
    that was already destroyed.

 gdk/gdkevents.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 6d926ae..83c313c 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -316,7 +316,8 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
       pending_motions == display->queued_tail)
     {
       GdkFrameClock *clock = gdk_window_get_frame_clock (pending_motion_window);
-      gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
+      if (clock) /* might be NULL if window was destroyed */
+       gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
     }
 }
 


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