mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
profiling: Only use frame timings when we have them
Christian Hergert reported a crash here, when testing the profiling code.
This commit is contained in:
parent
66dcbcdfe7
commit
ebc6bd834b
@ -573,8 +573,11 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
if (gdk_profiler_is_running ())
|
||||
{
|
||||
add_timings_to_profiler (timings);
|
||||
gdk_profiler_set_counter (fps_counter, timings->frame_end_time * 1000, frame_clock_get_fps (clock));
|
||||
if (timings)
|
||||
{
|
||||
add_timings_to_profiler (timings);
|
||||
gdk_profiler_set_counter (fps_counter, timings->frame_end_time * 1000, frame_clock_get_fps (clock));
|
||||
}
|
||||
}
|
||||
|
||||
if (GDK_DEBUG_CHECK (FRAMES))
|
||||
|
Loading…
Reference in New Issue
Block a user