summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-07 11:50:57 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-07 12:12:22 -0500
commit6a500331bdfd5529a582af1033d163f9e53e6861 (patch)
tree5a21eebfdd814d596801d04fe5a49703b83e6ee4
parentd54f0f66cf1faca39816ed9daf7656fb4819d96e (diff)
ecore: fix event flushing to not erase+leak events
stealing the message data here prevents events which aren't being flushed from ever being usable again and is unnecessary since the free callback will be automatically called during the destructor ref 5dd52fd09b7d79c70b3134423a87aa6400a2d994
-rw-r--r--src/lib/ecore/ecore_event_message_handler.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c
index 39f5dfe5a8..1b593d0771 100644
--- a/src/lib/ecore/ecore_event_message_handler.c
+++ b/src/lib/ecore/ecore_event_message_handler.c
@@ -413,18 +413,10 @@ _flush_cb(void *data, void *handler EINA_UNUSED, void *message)
413{ 413{
414 int *type = data; 414 int *type = data;
415 int evtype = -1; 415 int evtype = -1;
416 void *evdata = NULL, *free_func = NULL, *free_data = NULL;
417 Ecore_End_Cb fn_free = NULL;
418 416
419 if (!efl_isa(message, ECORE_EVENT_MESSAGE_CLASS)) return EINA_TRUE; 417 if (!efl_isa(message, ECORE_EVENT_MESSAGE_CLASS)) return EINA_TRUE;
420 ecore_event_message_data_steal(message, &evtype, &evdata, &free_func, &free_data); 418 ecore_event_message_data_get(message, &evtype, NULL, NULL, NULL);
421 if (*type != evtype) return EINA_TRUE; 419 return *type != evtype;
422 if (free_func)
423 {
424 fn_free = free_func;
425 fn_free(free_data, evdata);
426 }
427 return EINA_FALSE;
428} 420}
429 421
430EOLIAN static void 422EOLIAN static void