summaryrefslogtreecommitdiff
path: root/src/lib/eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-11 10:58:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-11 11:22:11 +0900
commite2f8ba7ad9d71d7eb6638e92f9c79e9dcb8e9474 (patch)
tree90e8fe0feacc57755e0d4181860c9414dde685a5 /src/lib/eo
parent521e2ab83ce0949de8101602d3596f30b7650bcb (diff)
eo: Check refs in efl_data_scope_safe_get
This makes sure the object is actually still alive and kicking before returning any data. Otherwise the "safe" word is a bit of an abuse... Ref T5869 @fix
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/eo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 20ed40b525..fb9f57f9ae 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2053,6 +2053,7 @@ efl_data_scope_safe_get(const Eo *obj_id, const Efl_Class *klass_id)
2053 if (!obj_id) return NULL; 2053 if (!obj_id) return NULL;
2054 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL); 2054 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
2055 EO_CLASS_POINTER_GOTO(klass_id, klass, err_klass); 2055 EO_CLASS_POINTER_GOTO(klass_id, klass, err_klass);
2056 if (obj->user_refcount <= 0) goto err_klass;
2056 2057
2057 if (_eo_class_mro_has(obj->klass, klass)) 2058 if (_eo_class_mro_has(obj->klass, klass))
2058 ret = _efl_data_scope_safe_get(obj, klass); 2059 ret = _efl_data_scope_safe_get(obj, klass);