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 5dd52fd09b
This commit is contained in:
Mike Blumenkrantz 2018-02-07 11:50:57 -05:00
parent d54f0f66cf
commit 6a500331bd
1 changed files with 2 additions and 10 deletions

View File

@ -413,18 +413,10 @@ _flush_cb(void *data, void *handler EINA_UNUSED, void *message)
{
int *type = data;
int evtype = -1;
void *evdata = NULL, *free_func = NULL, *free_data = NULL;
Ecore_End_Cb fn_free = NULL;
if (!efl_isa(message, ECORE_EVENT_MESSAGE_CLASS)) return EINA_TRUE;
ecore_event_message_data_steal(message, &evtype, &evdata, &free_func, &free_data);
if (*type != evtype) return EINA_TRUE;
if (free_func)
{
fn_free = free_func;
fn_free(free_data, evdata);
}
return EINA_FALSE;
ecore_event_message_data_get(message, &evtype, NULL, NULL, NULL);
return *type != evtype;
}
EOLIAN static void