raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=4342a3f65df9fd0f20907296555ddb8e61f55891

commit 4342a3f65df9fd0f20907296555ddb8e61f55891
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Aug 8 16:23:10 2014 +0900

    elm gengrid - fix CID 1222464
    
    it's possible to have a NULL item in this code - also missing a valid
    return at the end (though code path never gets there).
---
 src/lib/elm_gengrid.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index cb5666a..120adb8 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -2505,7 +2505,7 @@ _item_horizontal_loop(Evas_Object *obj, 
Elm_Focus_Direction dir)
         else
           return EINA_FALSE;
      }
-   
+   if (!item) return EINA_FALSE;
    if (sd->reorder_mode && !(sd->focused_item == item))
      {
         _swap_items((Elm_Gen_Item *)sd->focused_item, (Elm_Gen_Item *)item, 
ELM_FOCUS_RIGHT);
@@ -2516,6 +2516,7 @@ _item_horizontal_loop(Evas_Object *obj, 
Elm_Focus_Direction dir)
         elm_gengrid_item_selected_set(item, EINA_TRUE);
         return EINA_TRUE;
      }
+   return EINA_FALSE;
 }
 
 static Eina_Bool

-- 


Reply via email to