summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-08-26 17:09:38 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-08-26 17:15:05 +0900
commit3b175fd7e9e3e251d1f53909aa6a32e8e3a54461 (patch)
treed0a6363ace3e90e4737fe5ad18ab0c69b06bd6a1
parent5fc5cff03ee5b8071adeb17b9e8fb1b4f86227ef (diff)
downloadefl-3b175fd7e9e3e251d1f53909aa6a32e8e3a54461.tar.gz
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).
-rw-r--r--src/lib/elementary/efl_ui_win.c9
-rw-r--r--src/lib/elementary/elm_gengrid.c3
-rw-r--r--src/lib/elementary/elm_genlist.c1
3 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index aced7badc3..1177bec033 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -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
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 44a092cc6c..b0b62147c6 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -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--;
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index a00852eb2d..3e5abf8518 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -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))