path: root/src/lib
diff options
authorJean-Philippe Andre <>2017-12-18 11:58:43 +0900
committerJean-Philippe Andre <>2017-12-18 19:54:31 +0900
commit784a5b56a3c798e5a8081e2ce30c79cd8ef7b326 (patch)
treeca36741ba795a8b352b9f1d093c0e8ec13671107 /src/lib
parentfed81234480b7ed5b4d414f2df18b49992809a35 (diff)
loop: Try harder to find the main loop
If the object has no parent or anything else goes a bit wrong, efl_loop_get() may fail to return the loop object. It's a bit ridiculous when we're in the main loop as we know which loop object was requested. This avoids returning NULL.
Diffstat (limited to 'src/lib')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore/efl_loop_consumer.c b/src/lib/ecore/efl_loop_consumer.c
index d436da82ff..389e0c5f96 100644
--- a/src/lib/ecore/efl_loop_consumer.c
+++ b/src/lib/ecore/efl_loop_consumer.c
@@ -14,6 +14,8 @@ struct _Efl_Loop_Consumer_Data
14static Efl_Loop * 14static Efl_Loop *
15_efl_loop_consumer_loop_get(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED) 15_efl_loop_consumer_loop_get(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED)
16{ 16{
17 if (eina_main_loop_is())
18 return ecore_main_loop_get();
17 return efl_provider_find(obj, EFL_LOOP_CLASS); 19 return efl_provider_find(obj, EFL_LOOP_CLASS);
18} 20}
19 21