From 5e53e4b7e1b4f1818866d55922e43834ebfe7dc7 Mon Sep 17 00:00:00 2001 From: Sung-Taek Hong Date: Thu, 14 Jan 2016 14:23:03 -0800 Subject: [PATCH] ecore: check eina_main_loop before lock. Summary: - EINA_MAIN_LOOP_CHECK_RETURN should be called before ecore lock because this may return without ecore_unlock. - remove EINA_UNLIKELY(!eina_main_loop_is()) which is redundant. Reviewers: jpeg, jaehwan, cedric, raster Reviewed By: raster Subscribers: raster, conr2d, cedric, jpeg Projects: #efl Differential Revision: https://phab.enlightenment.org/D3541 Signed-off-by: Cedric BAIL --- src/lib/ecore/ecore_idle_exiter.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c index 8fc253009e..41e5f038a8 100644 --- a/src/lib/ecore/ecore_idle_exiter.c +++ b/src/lib/ecore/ecore_idle_exiter.c @@ -44,13 +44,9 @@ ecore_idle_exiter_add(Ecore_Task_Cb func, EOLIAN static void _ecore_idle_exiter_constructor(Eo *obj, Ecore_Idle_Exiter_Data *ie, Ecore_Task_Cb func, const void *data) { + EINA_MAIN_LOOP_CHECK_RETURN; + _ecore_lock(); - if (EINA_UNLIKELY(!eina_main_loop_is())) - { - EINA_MAIN_LOOP_CHECK_RETURN; - } - - ie->obj = obj; eo_manual_free_set(obj, EINA_TRUE);