From 008711b3b0f0b33e47e6b2fae7f925a0a9fb76ee Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 11 Feb 2017 23:20:22 +0100 Subject: [PATCH] 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 --- src/lib/evas/canvas/evas_object_table.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.7.4