summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-20 11:02:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-20 13:39:11 +0900
commit0d85525dc895a414d0f50d4a7e82049aa0afc69d (patch)
tree515e0d6c019f7d8c54e4dbba5b4051f598b52363 /src
parent28661cb650cbe340959b3a60eff78207e2afa606 (diff)
loop: Fix loop_get search priority
According to comments by @k-s & @raster. See 784a5b56a3c798e5a8 this was intended to be a fallback, not the first lookup indeed. Since this is an error case, let's print an ERR message at least.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/efl_loop_consumer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/ecore/efl_loop_consumer.c b/src/lib/ecore/efl_loop_consumer.c
index 389e0c5f96..f984909e1a 100644
--- a/src/lib/ecore/efl_loop_consumer.c
+++ b/src/lib/ecore/efl_loop_consumer.c
@@ -14,9 +14,14 @@ 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()) 17 Efl_Loop *loop = efl_provider_find(obj, EFL_LOOP_CLASS);
18 return ecore_main_loop_get(); 18 if (!loop && eina_main_loop_is())
19 return efl_provider_find(obj, EFL_LOOP_CLASS); 19 {
20 loop = ecore_main_loop_get();
21 ERR("Failed to get the loop on object %p from the main thread! "
22 "Returning the main loop: %p", obj, loop);
23 }
24 return loop;
20} 25}
21 26
22static void 27static void