elm: Fix some ERR messages following previous patch

This simply avoids calling functions on NULL objects, since
the previous patch would ERR out rather than silently ignore
the problem.

I just add explicit NULL checks before calling the functions,
so it's clear the object could be NULL (in the widget).
This commit is contained in:
Jean-Philippe Andre 2016-08-26 17:09:38 +09:00
parent 5fc5cff03e
commit 3b175fd7e9
3 changed files with 9 additions and 4 deletions

View File

@ -1102,9 +1102,12 @@ the_end:
_elm_win_focus_highlight_visible_set(sd, common_visible);
sd->focus_highlight.geometry_changed = EINA_FALSE;
sd->focus_highlight.prev = sd->focus_highlight.cur;
evas_object_event_callback_add
(sd->focus_highlight.prev.target,
EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data);
if (sd->focus_highlight.prev.target)
{
evas_object_event_callback_add
(sd->focus_highlight.prev.target,
EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data);
}
}
static void

View File

@ -4116,7 +4116,8 @@ _internal_elm_gengrid_clear(Evas_Object *obj,
if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next);
if (itn) itn->walking++; /* prevent early death of subitem */
_item_mouse_callbacks_del(it, VIEW(it));
if (VIEW(it))
_item_mouse_callbacks_del(it, VIEW(it));
it->del_cb(it);
efl_del(EO_OBJ(it));
if (itn) itn->walking--;

View File

@ -1523,6 +1523,7 @@ _item_cache_free(Item_Cache *itc)
static void
_item_cache_clean(Elm_Genlist_Data *sd)
{
if (!sd->obj) return;
evas_event_freeze(evas_object_evas_get(sd->obj));
while ((sd->item_cache) && (sd->item_cache_count > sd->item_cache_max))