when content is deleted, we should not keep a dangling pointer of it.
Setting it to NULL here is enough, as later on a swtich_to reuest will
be sent.
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10844
_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_del(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_canvas_group_member_remove(pd->container, subobj);
+ if (pd->current_content == subobj)
+ pd->current_content = NULL;
_content_changed(obj, pd);
}
EOLIAN static void
_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index)
{
efl_canvas_group_member_remove(pd->container, subobj);
+ for (int i = 0; i < 2; ++i)
+ {
+ if (pd->content[i] == subobj)
+ pd->content[i] = NULL;
+ }
_update_ids(obj, pd, index);
}