summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_interfaces_main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index d9b10e89d2..f5b8634d68 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -96,6 +96,12 @@ efl_part(const Eo *obj, const char *name)
96 if (!r) return NULL; 96 if (!r) return NULL;
97 97
98 efl_event_callback_add(r, EFL_EVENT_NOREF, _noref_death, NULL); 98 efl_event_callback_add(r, EFL_EVENT_NOREF, _noref_death, NULL);
99
100 //ensure that the parts that we have here are never leaked
101 //by checking theire references and ownership details
102 EINA_SAFETY_ON_NULL_RETURN_VAL(efl_parent_get(r), r);
103 EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_ref_count(r) == 1, r);
104
99 ___efl_auto_unref_set(r, EINA_TRUE); 105 ___efl_auto_unref_set(r, EINA_TRUE);
100 106
101 return efl_ref(r); 107 return efl_ref(r);