fix ibar exe watcher segv hole.

i got a segv with ibar and exe instance watching. a watcher was still
active even tho ic was freed (i think)... i don't know the
reproduction steps, but i think this is a hole.. so plug it.
This commit is contained in:
Carsten Haitzler 2013-06-04 19:18:43 +09:00
parent a612fcf2c9
commit 02d9596178
1 changed files with 2 additions and 1 deletions

View File

@ -671,6 +671,7 @@ _ibar_icon_free(IBar_Icon *ic)
evas_object_del(ic->o_holder2);
if (ic->exe_inst)
{
e_exec_instance_watcher_del(ic->exe_inst, _ibar_instance_watch, ic);
ic->exe_inst = NULL;
}
E_FREE(ic);
@ -1122,7 +1123,7 @@ _ibar_instance_watch(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type)
e_exec_instance_watcher_del(inst, _ibar_instance_watch, ic);
ic->exes = eina_list_remove(ic->exes, inst);
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,off", "e");
ic->exe_inst = NULL;
if (ic->exe_inst == inst) ic->exe_inst = NULL;
break;
case E_EXEC_WATCH_STARTED:
_ibar_icon_signal_emit(ic, "e,state,started", "e");