remove pip delete callback during pip free

fixes crash when unloading module while pips exist
This commit is contained in:
Mike Blumenkrantz 2015-12-02 13:40:17 -05:00
parent 24d4459e61
commit 267e84ca6d
1 changed files with 10 additions and 9 deletions

View File

@ -60,9 +60,19 @@ pips_edit(void)
e_comp_shape_queue();
}
static void
_pip_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Client *ec = data;
eina_hash_del_by_key(pips, &ec->frame);
if (editing && (!eina_hash_population(pips)))
pips_noedit();
}
static void
pip_free(Pip *pip)
{
evas_object_event_callback_del(pip->pip, EVAS_CALLBACK_DEL, _pip_del);
evas_object_del(pip->pip);
evas_object_del(pip->clip);
free(pip);
@ -287,15 +297,6 @@ _pip_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
action_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, (Ecore_Event_Handler_Cb)_pip_mouse_move, pip);
}
static void
_pip_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
E_Client *ec = data;
eina_hash_del_by_key(pips, &ec->frame);
if (editing && (!eina_hash_population(pips)))
pips_noedit();
}
static void
_pip_delete(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
{