summaryrefslogtreecommitdiff
path: root/src/lib/eo/eo.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-05-03 11:37:08 -0700
committerCedric BAIL <cedric@osg.samsung.com>2018-05-24 16:02:18 -0700
commitdcfddcd283e01e36096d573af9b46f512a39272c (patch)
treead2f6c52800d6ace0b4a113c1641397f93ade6a8 /src/lib/eo/eo.c
parent79e4947f3e197f7d1c8336057cf54d6ddef482bc (diff)
eo: make sure efl_noref is always called at the proper time.
Differential Revision: https://phab.enlightenment.org/D6096
Diffstat (limited to 'src/lib/eo/eo.c')
-rw-r--r--src/lib/eo/eo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index a6323d1..558ee29 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -1891,7 +1891,8 @@ efl_unref(const Eo *obj_id)
1891 return ; 1891 return ;
1892 } 1892 }
1893 1893
1894 if (EINA_UNLIKELY(obj->user_refcount == 1)) 1894 if (EINA_UNLIKELY((obj->user_refcount == 1 && !obj->parent) ||
1895 (obj->user_refcount == 2 && obj->parent)))
1895 { 1896 {
1896 // The noref event should happen before any object in the 1897 // The noref event should happen before any object in the
1897 // tree get affected by the change in refcount. 1898 // tree get affected by the change in refcount.