Eo: Fix rare crash after call_resolve

It seems that calling a @class function with an EO object
(that was not the required Eo_Class) lead to a situation
where func->func was NULL. And that meant a crash after
call_resolve.

The proper fix is to properly call a @class function with a
class object.
This commit is contained in:
Jean-Philippe Andre 2016-04-06 11:25:29 +09:00
parent 98edbd23a4
commit 0862b9d083
1 changed files with 7 additions and 4 deletions

View File

@ -347,12 +347,15 @@ _eo_call_resolve(Eo *eo_id, const char *func_name, Eo_Op_Call_Data *call, Eo_Cal
if ((const void *)inputklass == cache->index[i].klass)
{
func = (const op_type_funcs *)cache->entry[i].func;
call->func = func->func;
if (is_obj)
if (EINA_LIKELY(func->func && func->src))
{
call->data = (char *) obj + cache->off[i].off;
call->func = func->func;
if (is_obj)
{
call->data = (char *) obj + cache->off[i].off;
}
return EINA_TRUE;
}
return EINA_TRUE;
}
}
#endif