From 1b058695f5069933e12cd65e8a4fa4abbf01aa3c Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Tue, 24 Mar 2020 14:39:54 +0100 Subject: [PATCH] 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 Differential Revision: https://phab.enlightenment.org/D11575 --- src/lib/eo/eo.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 3d1e7dd24a..cbb3136818 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -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; }