summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-15 16:16:19 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-15 16:17:42 +0900
commit69c595b5fdd07596fef4462b8a7e7b8efc03e12b (patch)
tree806d05a5aad3206dfb7be1dc3cc973abc3330fd7
parent02737b1308ef62f0c12dd35b145bbd8148ec3385 (diff)
eo: Fix crash with invalid objects
Not a legacy fix as auto-unref is new in 1.21.
-rw-r--r--src/lib/eo/eo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 32939afa50..d421c58bc8 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -744,8 +744,9 @@ _efl_object_op_api_id_get(const void *api_func, const Eo *eo_obj, const char *ap
744 EO_OBJ_POINTER(eo_obj, obj); 744 EO_OBJ_POINTER(eo_obj, obj);
745 eina_log_print(_eo_log_dom, EINA_LOG_LEVEL_ERR, 745 eina_log_print(_eo_log_dom, EINA_LOG_LEVEL_ERR,
746 file, api_func_name, line, 746 file, api_func_name, line,
747 "Unable to resolve op for api func %p for obj=%p (%s)", api_func, eo_obj, efl_class_name_get(eo_obj)); 747 "Unable to resolve op for api func %p for obj=%p (%s)",
748 if (EINA_UNLIKELY(obj->auto_unref)) 748 api_func, eo_obj, efl_class_name_get(eo_obj));
749 if (EINA_UNLIKELY(obj && obj->auto_unref))
749 { 750 {
750 if (obj->finalized && !(--obj->auto_unref)) 751 if (obj->finalized && !(--obj->auto_unref))
751 efl_unref(eo_obj); 752 efl_unref(eo_obj);