forked from enlightenment/enlightenment
ibar - fix collection of segvs dealing with ibar icon menu invalid refs
This commit is contained in:
parent
00cb30ac6e
commit
f2a5a5f570
|
@ -827,6 +827,12 @@ _ibar_icon_free(IBar_Icon *ic)
|
|||
{
|
||||
E_Exec_Instance *inst;
|
||||
|
||||
if (ic->ibar->menu_icon == ic) ic->ibar->menu_icon = NULL;
|
||||
if (ic->ibar->ic_drop_before == ic) ic->ibar->ic_drop_before = NULL;
|
||||
if (ic->menu) e_object_data_set(E_OBJECT(ic->menu), NULL);
|
||||
E_FREE_FUNC(ic->menu, e_object_del);
|
||||
E_FREE_FUNC(ic->timer, ecore_timer_del);
|
||||
E_FREE_FUNC(ic->hide_timer, ecore_timer_del);
|
||||
ic->ibar->icons = eina_inlist_remove(ic->ibar->icons, EINA_INLIST_GET(ic));
|
||||
eina_hash_del_by_key(ic->ibar->icon_hash, _desktop_name_get(ic->app));
|
||||
E_FREE_FUNC(ic->reset_timer, ecore_timer_del);
|
||||
|
@ -839,9 +845,6 @@ _ibar_icon_free(IBar_Icon *ic)
|
|||
EINA_LIST_FREE(ic->exes, inst)
|
||||
if (!ic->not_in_order)
|
||||
e_exec_instance_watcher_del(inst, _ibar_instance_watch, ic);
|
||||
E_FREE_FUNC(ic->menu, e_object_del);
|
||||
E_FREE_FUNC(ic->timer, ecore_timer_del);
|
||||
E_FREE_FUNC(ic->hide_timer, ecore_timer_del);
|
||||
evas_object_del(ic->o_holder);
|
||||
evas_object_del(ic->o_holder2);
|
||||
if (ic->exe_inst)
|
||||
|
@ -1021,6 +1024,8 @@ static void
|
|||
_ibar_cb_icon_menu_del(void *obj)
|
||||
{
|
||||
IBar_Icon *ic = e_object_data_get(obj);
|
||||
|
||||
if (!ic) return;
|
||||
ic->menu = NULL;
|
||||
}
|
||||
|
||||
|
@ -1627,6 +1632,7 @@ _ibar_cb_drag_finished(E_Drag *drag, int dropped)
|
|||
IBar *i = e_object_data_get(E_OBJECT(drag));
|
||||
|
||||
efreet_desktop_unref(drag->data);
|
||||
if (!i) return;
|
||||
if (!dropped)
|
||||
{
|
||||
_ibar_empty(i);
|
||||
|
|
Loading…
Reference in New Issue