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:
Matthias Clasen 2019-05-13 15:49:25 -04:00
parent 66dcbcdfe7
commit ebc6bd834b

View File

@ -572,10 +572,13 @@ gdk_frame_clock_paint_idle (void *data)
#ifdef G_ENABLE_DEBUG
if (gdk_profiler_is_running ())
{
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))
{