summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2016-07-04 07:29:53 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2016-07-04 07:31:15 +0900
commit3627fa7883aee310f2966f5562f4a0e5cf7a5d58 (patch)
tree942fb12f3826b67190760ca715b254522d008796
parentbc7f22375453a63e7c1b71266c4f25b92a18e8ea (diff)
elm/gengrid: Fix null pointer dereferences.
CID: 1357210 and 1357209.
-rw-r--r--src/lib/elementary/elm_gengrid.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 3abe8575d4..187a60c854 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -2075,8 +2075,9 @@ _item_focus_up(Elm_Gengrid_Data *sd)
2075 if (!sd->focused_item) 2075 if (!sd->focused_item)
2076 { 2076 {
2077 prev = ELM_GEN_ITEM_FROM_INLIST(sd->items->last); 2077 prev = ELM_GEN_ITEM_FROM_INLIST(sd->items->last);
2078 while (((prev) && (prev->generation < sd->generation)) 2078 while (prev &&
2079 || elm_object_item_disabled_get(EO_OBJ(prev))) 2079 (prev->generation < sd->generation ||
2080 elm_object_item_disabled_get(EO_OBJ(prev))))
2080 prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev); 2081 prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
2081 } 2082 }
2082 else 2083 else
@@ -2116,8 +2117,9 @@ _item_focus_down(Elm_Gengrid_Data *sd)
2116 if (!sd->focused_item) 2117 if (!sd->focused_item)
2117 { 2118 {
2118 next = ELM_GEN_ITEM_FROM_INLIST(sd->items); 2119 next = ELM_GEN_ITEM_FROM_INLIST(sd->items);
2119 while (((next) && (next->generation < sd->generation)) 2120 while (next &&
2120 || elm_object_item_disabled_get(EO_OBJ(next))) 2121 (next->generation < sd->generation
2122 || elm_object_item_disabled_get(EO_OBJ(next))))
2121 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); 2123 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
2122 } 2124 }
2123 else 2125 else