eo: do no allocate a 0 sized segment

allocating 0 sized elements here is pointless.
This here was doing that, so ensure that we are only allocating vtable
nodes that have more than 0 function pointers.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11575
This commit is contained in:
Marcel Hollerbach 2020-03-24 14:39:54 +01:00
parent f80cfa4893
commit 1b058695f5
1 changed files with 5 additions and 2 deletions

View File

@ -864,8 +864,11 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops *ops, const _Efl_Cla
if (!override_only)
{
//Before setting any real functions, allocate the node that will contain all the functions
_vtable_prepare_empty_node(vtable, number_of_new_functions, class_id);
if (number_of_new_functions)
{
//Before setting any real functions, allocate the node that will contain all the functions
_vtable_prepare_empty_node(vtable, number_of_new_functions, class_id);
}
hitmap[class_id] = EINA_TRUE;
}