diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-08-26 17:09:38 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-08-26 17:15:05 +0900 |
commit | 3b175fd7e9e3e251d1f53909aa6a32e8e3a54461 (patch) | |
tree | d0a6363ace3e90e4737fe5ad18ab0c69b06bd6a1 | |
parent | 5fc5cff03ee5b8071adeb17b9e8fb1b4f86227ef (diff) |
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.c | 9 | ||||
-rw-r--r-- | src/lib/elementary/elm_gengrid.c | 3 | ||||
-rw-r--r-- | src/lib/elementary/elm_genlist.c | 1 |
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: | |||
1102 | _elm_win_focus_highlight_visible_set(sd, common_visible); | 1102 | _elm_win_focus_highlight_visible_set(sd, common_visible); |
1103 | sd->focus_highlight.geometry_changed = EINA_FALSE; | 1103 | sd->focus_highlight.geometry_changed = EINA_FALSE; |
1104 | sd->focus_highlight.prev = sd->focus_highlight.cur; | 1104 | sd->focus_highlight.prev = sd->focus_highlight.cur; |
1105 | evas_object_event_callback_add | 1105 | if (sd->focus_highlight.prev.target) |
1106 | (sd->focus_highlight.prev.target, | 1106 | { |
1107 | EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data); | 1107 | evas_object_event_callback_add |
1108 | (sd->focus_highlight.prev.target, | ||
1109 | EVAS_CALLBACK_DEL, _elm_win_focus_prev_target_del, data); | ||
1110 | } | ||
1108 | } | 1111 | } |
1109 | 1112 | ||
1110 | static void | 1113 | 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, | |||
4116 | 4116 | ||
4117 | if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next); | 4117 | if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next); |
4118 | if (itn) itn->walking++; /* prevent early death of subitem */ | 4118 | if (itn) itn->walking++; /* prevent early death of subitem */ |
4119 | _item_mouse_callbacks_del(it, VIEW(it)); | 4119 | if (VIEW(it)) |
4120 | _item_mouse_callbacks_del(it, VIEW(it)); | ||
4120 | it->del_cb(it); | 4121 | it->del_cb(it); |
4121 | efl_del(EO_OBJ(it)); | 4122 | efl_del(EO_OBJ(it)); |
4122 | if (itn) itn->walking--; | 4123 | 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) | |||
1523 | static void | 1523 | static void |
1524 | _item_cache_clean(Elm_Genlist_Data *sd) | 1524 | _item_cache_clean(Elm_Genlist_Data *sd) |
1525 | { | 1525 | { |
1526 | if (!sd->obj) return; | ||
1526 | evas_event_freeze(evas_object_evas_get(sd->obj)); | 1527 | evas_event_freeze(evas_object_evas_get(sd->obj)); |
1527 | 1528 | ||
1528 | while ((sd->item_cache) && (sd->item_cache_count > sd->item_cache_max)) | 1529 | while ((sd->item_cache) && (sd->item_cache_count > sd->item_cache_max)) |