]> Pileus Git - ~andy/gtk/commitdiff
gdk: prevent NULL pointer access when debugging is enabled
authorThomas Wood <thomas.wood@intel.com>
Tue, 26 Feb 2013 11:06:45 +0000 (11:06 +0000)
committerThomas Wood <thomas.wood@intel.com>
Tue, 26 Feb 2013 15:27:53 +0000 (15:27 +0000)
If no updates, redraws, or repaints have been scheduled for this frame,
we will skip immediately to RESUME_EVENTS, and no GdkFrameTimings will
be created.

https://bugzilla.gnome.org/show_bug.cgi?id=694732

gdk/gdkframeclockidle.c

index 2d4947c4df119d3e68c19d3a2db59d89ee481a05..5901c7f6caf825dfd11a6f9dd216c4ebeef54810 100644 (file)
@@ -441,7 +441,7 @@ gdk_frame_clock_paint_idle (void *data)
 #ifdef G_ENABLE_DEBUG
   if ((_gdk_debug_flags & GDK_DEBUG_FRAMES) != 0)
     {
-      if (timings->complete)
+      if (timings && timings->complete)
         _gdk_frame_clock_debug_print_timings (clock, timings);
     }
 #endif /* G_ENABLE_DEBUG */