summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-01-04 11:21:36 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-01-04 11:45:10 -0800
commitce373c9b1ff160ad645b1d396393f8679e782fd2 (patch)
tree58695eb9adad2ec81cfb400fd1471235a67d539c
parente30fb6945e10cc8fd4b519684068072c82fee3d9 (diff)
ecore: fallback to use efl_provider_find if the passed object isn't an Efl.Loop_Consumer.
-rw-r--r--src/lib/ecore/efl_loop.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c
index 6ab26bd0fb..56b7efe218 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -717,6 +717,8 @@ _efl_loop_efl_version_get(Eo *obj EINA_UNUSED, Efl_Loop_Data *pd EINA_UNUSED)
717EAPI Eina_Future_Scheduler * 717EAPI Eina_Future_Scheduler *
718efl_loop_future_scheduler_get(const Eo *obj) 718efl_loop_future_scheduler_get(const Eo *obj)
719{ 719{
720 Efl_Loop *loop;
721
720 if (!obj) return NULL; 722 if (!obj) return NULL;
721 723
722 if (efl_isa(obj, EFL_LOOP_CLASS)) 724 if (efl_isa(obj, EFL_LOOP_CLASS))
@@ -734,8 +736,14 @@ efl_loop_future_scheduler_get(const Eo *obj)
734 } 736 }
735 return &(pd->future_scheduler.eina_future_scheduler); 737 return &(pd->future_scheduler.eina_future_scheduler);
736 } 738 }
739 if (efl_isa(obj, EFL_LOOP_CONSUMER_CLASS))
740 return efl_loop_future_scheduler_get(efl_loop_get(obj));
741
742 loop = efl_provider_find(obj, EFL_LOOP_CLASS);
743 if (loop)
744 return efl_loop_future_scheduler_get(loop);
737 745
738 return efl_loop_future_scheduler_get(efl_loop_get(obj)); 746 return NULL;
739} 747}
740 748
741#define EFL_LOOP_EXTRA_OPS \ 749#define EFL_LOOP_EXTRA_OPS \