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
This commit is contained in:
Marcel Hollerbach 2017-02-11 23:20:22 +01:00
parent c59a8ddebc
commit 008711b3b0
1 changed files with 5 additions and 0 deletions

View File

@ -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;