summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-05-03 11:36:28 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-24 16:02:18 -0700
commit79e4947f3e197f7d1c8336057cf54d6ddef482bc (patch)
tree97601f8c6640964b1390c87f82a2d7db1ef01c7c /src/lib/eo/eo.c
parentc1cef1e74b1d49efe4b886d892c58e00d62a81aa (diff)
eo: add an automatic fallback at the moment when efl_unref instead of efl_del is called.
Differential Revision: https://phab.enlightenment.org/D6095
Diffstat (limited to 'src/lib/eo/eo.c')
-rw-r--r--src/lib/eo/eo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index d034c70..a6323d1 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1882,6 +1882,15 @@ efl_unref(const Eo *obj_id)
1882{ 1882{
1883 EO_OBJ_POINTER_RETURN(obj_id, obj); 1883 EO_OBJ_POINTER_RETURN(obj_id, obj);
1884 1884
1885 if (EINA_UNLIKELY(obj->user_refcount == 1 &&
1886 obj->parent))
1887 {
1888 CRI("Calling efl_unref instead of efl_del or efl_parent_set(NULL). Temporary fallback in place triggered.");
1889 EO_OBJ_DONE(obj_id);
1890 efl_del(obj_id);
1891 return ;
1892 }
1893
1885 if (EINA_UNLIKELY(obj->user_refcount == 1)) 1894 if (EINA_UNLIKELY(obj->user_refcount == 1))
1886 { 1895 {
1887 // The noref event should happen before any object in the 1896 // The noref event should happen before any object in the