eo: Fix crash with invalid objects

Not a legacy fix as auto-unref is new in 1.21.
This commit is contained in:
Jean-Philippe Andre 2017-12-15 16:16:19 +09:00
parent 02737b1308
commit 69c595b5fd
1 changed files with 3 additions and 2 deletions

View File

@ -744,8 +744,9 @@ _efl_object_op_api_id_get(const void *api_func, const Eo *eo_obj, const char *ap
EO_OBJ_POINTER(eo_obj, obj);
eina_log_print(_eo_log_dom, EINA_LOG_LEVEL_ERR,
file, api_func_name, line,
"Unable to resolve op for api func %p for obj=%p (%s)", api_func, eo_obj, efl_class_name_get(eo_obj));
if (EINA_UNLIKELY(obj->auto_unref))
"Unable to resolve op for api func %p for obj=%p (%s)",
api_func, eo_obj, efl_class_name_get(eo_obj));
if (EINA_UNLIKELY(obj && obj->auto_unref))
{
if (obj->finalized && !(--obj->auto_unref))
efl_unref(eo_obj);