Player: reset evas pointer inside list on deletion
This commit is contained in:
parent
12af68f993
commit
239e38f173
|
@ -569,6 +569,7 @@ _stabilization_timer_cb(void *data EINA_UNUSED)
|
|||
_printf(2, "Not stable yet!\n");
|
||||
EINA_LIST_FOREACH(_evas_list, itr, e)
|
||||
{
|
||||
if (!e) continue;
|
||||
Exactness_Image *last_img = efl_key_data_get(e, "_last_stab_shot");
|
||||
Exactness_Image *cur_img = _snapshot_shot_get(e);
|
||||
if (!last_img || exactness_image_compare(last_img, cur_img, NULL)) need_more = STAB_MAX;
|
||||
|
@ -962,6 +963,13 @@ _old_shots_rm_cb(const char *name, const char *path, void *data)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_evas_del_cb(void *data EINA_UNUSED, const Efl_Event *event)
|
||||
{
|
||||
Eina_List *p = eina_list_data_find_list(_evas_list, event->object);
|
||||
eina_list_data_set(p, NULL);
|
||||
}
|
||||
|
||||
static Evas *
|
||||
_my_evas_new(int w EINA_UNUSED, int h EINA_UNUSED)
|
||||
{
|
||||
|
@ -972,6 +980,7 @@ _my_evas_new(int w EINA_UNUSED, int h EINA_UNUSED)
|
|||
{
|
||||
_printf(1, "New Evas\n");
|
||||
_evas_list = eina_list_append(_evas_list, e);
|
||||
efl_event_callback_add(e, EFL_EVENT_DEL, _evas_del_cb, NULL);
|
||||
efl_event_callback_add(e, EFL_CANVAS_SCENE_EVENT_RENDER_POST, _evas_render_post_cb, NULL);
|
||||
}
|
||||
return e;
|
||||
|
|
Loading…
Reference in New Issue