diff options
author | Marcel Hollerbach <marcel-hollerbach@t-online.de> | 2017-02-14 21:52:33 +0100 |
---|---|---|
committer | Marcel Hollerbach <marcel-hollerbach@t-online.de> | 2017-02-14 22:10:26 +0100 |
commit | 6becc2b1796bad6f09264821259dcb8402a03b85 (patch) | |
tree | 9e856b8818b075bbfa40a8cd545e73f6fd607f3d | |
parent | aae335293274175fb101fefce2c6245f916249c7 (diff) | |
download | enlightenment-6becc2b1796bad6f09264821259dcb8402a03b85.tar.gz |
e_exec: split up the free of the instance
otherwise two calls to that free would not sent the event, but free the
instance, undependend of the event beeing emitted or not.
fix T4963
-rw-r--r-- | src/bin/e_exec.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c index 7bfcc36ceb..56525074a0 100644 --- a/src/bin/e_exec.c +++ b/src/bin/e_exec.c @@ -616,21 +616,7 @@ _e_exec_instance_free(E_Exec_Instance *inst) ecore_event_add(E_EVENT_EXEC_DEL, inst, _e_exec_cb_exec_del_free, inst); return EINA_FALSE; } - if (inst->desktop) - e_exec_start_pending = eina_list_remove(e_exec_start_pending, - inst->desktop); - if (inst->expire_timer) ecore_timer_del(inst->expire_timer); - EINA_LIST_FREE(inst->clients, ec) - { - ec->exe_inst = NULL; - e_object_unref(E_OBJECT(ec)); - } - if (inst->desktop) efreet_desktop_free(inst->desktop); - if (!inst->phony) - { - if (inst->exe) ecore_exe_data_set(inst->exe, NULL); - } - free(inst); + return EINA_TRUE; } @@ -668,9 +654,27 @@ static void _e_exec_cb_exec_del_free(void *data, void *ev EINA_UNUSED) { E_Exec_Instance *inst = data; + E_Client *ec; inst->ref--; - _e_exec_instance_free(inst); + + if (inst->desktop) + e_exec_start_pending = eina_list_remove(e_exec_start_pending, + inst->desktop); + if (inst->expire_timer) ecore_timer_del(inst->expire_timer); + + EINA_LIST_FREE(inst->clients, ec) + { + ec->exe_inst = NULL; + e_object_unref(E_OBJECT(ec)); + } + + if (inst->desktop) efreet_desktop_free(inst->desktop); + if (!inst->phony) + { + if (inst->exe) ecore_exe_data_set(inst->exe, NULL); + } + free(inst); } static Eina_Bool |