summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-15 19:08:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-18 19:54:31 +0900
commit796b1dd56684e5acf606c1f6f37edd61c9c47dbf (patch)
treeb5522f9fca0f447be1b1ee1c4460542a5dd7a19d /src/lib
parent5dbfb7961f738245cceb144123cee207a1d65d55 (diff)
ecore: Fix legacy message handlers destruction
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore/ecore_event_message_handler.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c
index 3879c3c78e..9a6e03e006 100644
--- a/src/lib/ecore/ecore_event_message_handler.c
+++ b/src/lib/ecore/ecore_event_message_handler.c
@@ -171,6 +171,12 @@ _ecore_event_message_handler_handler_del(Eo *obj EINA_UNUSED, Ecore_Event_Messag
171 data = h->data; 171 data = h->data;
172 if (pd->handlers_walking > 0) 172 if (pd->handlers_walking > 0)
173 { 173 {
174 if (h->to_add)
175 {
176 h->to_add = EINA_FALSE;
177 pd->handlers_add = eina_list_remove(pd->handlers_add, h);
178 }
179
174 h->delete_me = EINA_TRUE; 180 h->delete_me = EINA_TRUE;
175 pd->handlers_delete = eina_list_append(pd->handlers_delete, h); 181 pd->handlers_delete = eina_list_append(pd->handlers_delete, h);
176 } 182 }
@@ -284,9 +290,14 @@ _ecore_event_message_handler_efl_object_destructor(Eo *obj, Ecore_Event_Message_
284 { 290 {
285 free(h); 291 free(h);
286 } 292 }
287 for (i = 0; i < pd->event_type_count; i++) 293 for (i = 0; i <= pd->event_type_count; i++)
288 { 294 {
289 EINA_INLIST_FREE(pd->handlers[i], h) free(h); 295 EINA_INLIST_FREE(pd->handlers[i], h)
296 {
297 pd->handlers[i] = eina_inlist_remove(pd->handlers[i],
298 EINA_INLIST_GET(h));
299 free(h);
300 }
290 } 301 }
291 free(pd->handlers); 302 free(pd->handlers);
292 pd->handlers = NULL; 303 pd->handlers = NULL;