bugfix: unref client when removing from exec if exec is deleted

fixes a race condition where client would never be freed when closing lots of windows simultaneously
This commit is contained in:
Mike Blumenkrantz 2014-02-17 11:59:27 -05:00 committed by Iván Briano
parent 60483a11a0
commit 4c2db4342a
1 changed files with 5 additions and 1 deletions

View File

@ -488,7 +488,11 @@ _e_client_del(E_Client *ec)
if (ec->exe_inst->phony && (eina_list_count(ec->exe_inst->clients) == 1))
e_exec_phony_del(ec->exe_inst);
else
ec->exe_inst->clients = eina_list_remove(ec->exe_inst->clients, ec);
{
ec->exe_inst->clients = eina_list_remove(ec->exe_inst->clients, ec);
if (ec->exe_inst->deleted)
e_object_unref(E_OBJECT(ec));
}
ec->exe_inst = NULL;
}