check ec pointer before deref in luncher's E_EVENT_EXEC_DEL handler

a deleted exe is unlikely to have clients

fix T5599
This commit is contained in:
Mike Blumenkrantz 2017-06-30 10:25:23 -04:00
parent 9357ecc443
commit 1f0bed7e0b
1 changed files with 3 additions and 3 deletions

View File

@ -1357,7 +1357,7 @@ _bar_cb_exec_del(void *data EINA_UNUSED, int type EINA_UNUSED, E_Exec_Instance *
if (!inst->bar) continue; if (!inst->bar) continue;
if (inst->cfg->type == E_LUNCHER_MODULE_LAUNCH_ONLY) continue; if (inst->cfg->type == E_LUNCHER_MODULE_LAUNCH_ONLY) continue;
if (ex->desktop) if (ex->desktop)
{ {
ic = eina_hash_find(inst->icons_desktop_hash, ex->desktop->orig_path); ic = eina_hash_find(inst->icons_desktop_hash, ex->desktop->orig_path);
} }
@ -1366,8 +1366,8 @@ _bar_cb_exec_del(void *data EINA_UNUSED, int type EINA_UNUSED, E_Exec_Instance *
if (ic->starting) elm_layout_signal_emit(ic->o_layout, "e,state,started", "e"); if (ic->starting) elm_layout_signal_emit(ic->o_layout, "e,state,started", "e");
ic->starting = EINA_FALSE; ic->starting = EINA_FALSE;
ic->execs = eina_list_remove(ic->execs, ex); ic->execs = eina_list_remove(ic->execs, ex);
ic->clients = eina_list_remove(ic->clients, ec); if (ec) ic->clients = eina_list_remove(ic->clients, ec);
if (ic->client_cbs) if (ec && ic->client_cbs)
{ {
ic->client_cbs = eina_list_remove(ic->client_cbs, ec); ic->client_cbs = eina_list_remove(ic->client_cbs, ec);
evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_SHOW, _bar_exec_new_show, ic); evas_object_event_callback_del_full(ec->frame, EVAS_CALLBACK_SHOW, _bar_exec_new_show, ic);