efl_loop_user: error if parent is not a loop provider.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Thu, 18 Aug 2016 04:01:25 +0000 (01:01 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Thu, 18 Aug 2016 05:13:32 +0000 (02:13 -0300)
it was silently ignoring the parent, which led me to hours trying to
investigate why my code wasn't working just to realize my parent
wasn't being assigned and refcounts were screwed.

src/lib/ecore/efl_loop_user.c

index 78ac3a8..530772f 100644 (file)
@@ -21,7 +21,10 @@ static void
 _efl_loop_user_efl_object_parent_set(Eo *obj, Efl_Loop_User_Data *pd EINA_UNUSED, Efl_Object *parent)
 {
    if (parent != NULL && efl_provider_find(parent, EFL_LOOP_CLASS) == NULL)
-     return ;
+     {
+        ERR("parent=%p is not a provider of EFL_LOOP_CLASS!", parent);
+        return;
+     }
 
    efl_parent_set(efl_super(obj, EFL_LOOP_USER_CLASS), parent);
 }