genlist : fix wrong item referencing in pos adjust 76/139276/2
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 18 Jul 2017 07:30:26 +0000 (16:30 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Fri, 21 Jul 2017 01:48:35 +0000 (10:48 +0900)
Change-Id: Ie055661c4f20308511f7c39c92e2dee36bbcdb15
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/mobile_lib/elm_genlist.c

index 409414c..7e85209 100644 (file)
@@ -617,7 +617,6 @@ _elm_genlist_pan_elm_pan_pos_adjust(Eo *obj EINA_UNUSED, Elm_Genlist_Pan_Data *p
 
    if (!y) return;
 
-   Elm_Gen_Item *adjust_item = NULL;
    Elm_Object_Item *eo_it;
    Evas_Coord vw, vh;
    Evas_Coord cx = 0, cy = 0;
@@ -641,8 +640,8 @@ _elm_genlist_pan_elm_pan_pos_adjust(Eo *obj EINA_UNUSED, Elm_Genlist_Pan_Data *p
           eo_it = elm_genlist_item_next_get(EO_OBJ(sd->adjusted_item));
         else
           eo_it = elm_genlist_item_prev_get(EO_OBJ(sd->adjusted_item));
-        adjust_item = eo_data_scope_get(eo_it, ELM_GENLIST_ITEM_CLASS);
-        if (adjust_item)
+        adjusted_item = eo_data_scope_get(eo_it, ELM_GENLIST_ITEM_CLASS);
+        if (adjusted_item)
           sd->adjusted_item = adjusted_item;
      }
    sd->adjusted_item = _adjust_item_align(sd->adjusted_item);