summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore/ecore_timer.c')
-rw-r--r--src/lib/ecore/ecore_timer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 37280e8ee3..96b1a13a51 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -321,13 +321,15 @@ ecore_timer_freeze(Ecore_Timer *timer)
321EOLIAN static void 321EOLIAN static void
322_efl_loop_timer_efl_object_event_freeze(Eo *obj, Efl_Loop_Timer_Data *timer) 322_efl_loop_timer_efl_object_event_freeze(Eo *obj, Efl_Loop_Timer_Data *timer)
323{ 323{
324 double now; 324 double now = 0.0;
325 325
326 efl_event_freeze(efl_super(obj, MY_CLASS)); 326 efl_event_freeze(efl_super(obj, MY_CLASS));
327 // Timer already frozen 327 // Timer already frozen
328 if (timer->frozen) return; 328 if (timer->frozen) return;
329 329
330 now = efl_loop_time_get(timer->loop); 330 /* not set if timer is not finalized */
331 if (timer->loop)
332 now = efl_loop_time_get(timer->loop);
331 /* only if timer interval has been set */ 333 /* only if timer interval has been set */
332 if (timer->initialized) 334 if (timer->initialized)
333 timer->pending = timer->at - now; 335 timer->pending = timer->at - now;