From: Marcel Hollerbach Date: Sat, 11 Feb 2017 22:20:22 +0000 (+0100) Subject: evas_table: abort when there is already the option struct X-Git-Tag: upstream/1.20.0~2048 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=008711b3b0f0b33e47e6b2fae7f925a0a9fb76ee;p=platform%2Fupstream%2Fefl.git evas_table: abort when there is already the option struct otherwise we would just reuse that struct. This results in freeing/writing/reading the memory twice. This error message should give the dev a tip on what went wrong, instead of leaving cryptic valgrind messages and crashes. This fixes the sysinfo desktop gadget in enlightenment. ref T5173 --- diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c index 5eea6f9..ca615e6 100644 --- a/src/lib/evas/canvas/evas_object_table.c +++ b/src/lib/evas/canvas/evas_object_table.c @@ -1143,6 +1143,11 @@ _evas_table_pack(Eo *o, Evas_Table_Data *priv, Evas_Object *child, unsigned shor } optalloc = EINA_TRUE; } + else + { + ERR("%p is already added to a table", child); + return EINA_FALSE; + } opt->obj = child; opt->col = col;