summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-11 23:20:22 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-02-12 00:10:05 +0100
commit008711b3b0f0b33e47e6b2fae7f925a0a9fb76ee (patch)
tree6852637486760985bc235117952c6e1dcc068d87 /src
parentc59a8ddebc6d1d8fd4f6c9855b7c8cb1c50a6c6e (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_table.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index 5eea6f9599..ca615e6344 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
1143 } 1143 }
1144 optalloc = EINA_TRUE; 1144 optalloc = EINA_TRUE;
1145 } 1145 }
1146 else
1147 {
1148 ERR("%p is already added to a table", child);
1149 return EINA_FALSE;
1150 }
1146 1151
1147 opt->obj = child; 1152 opt->obj = child;
1148 opt->col = col; 1153 opt->col = col;