On Mon, Dec 18, 2017 at 9:04 AM, Jean-Philippe ANDRÉ <j...@videolan.org> wrote: > jpeg pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=784a5b56a3c798e5a8081e2ce30c79cd8ef7b326 > > commit 784a5b56a3c798e5a8081e2ce30c79cd8ef7b326 > Author: Jean-Philippe Andre <jp.an...@samsung.com> > Date: Mon Dec 18 11:58:43 2017 +0900 > > 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. > --- > src/lib/ecore/efl_loop_consumer.c | 2 ++ > 1 file changed, 2 insertions(+) > > 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 > static Efl_Loop * > _efl_loop_consumer_loop_get(Eo *obj, Efl_Loop_Consumer_Data *pd EINA_UNUSED) > { > + if (eina_main_loop_is()) > + return ecore_main_loop_get(); > return efl_provider_find(obj, EFL_LOOP_CLASS);
looks like that should be the fallback, not the first thing to check: only check if the main loop if there is no provider for EFL_LOOP_CLASS. -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel