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

index c5cc519d7577ec9e549e011366b65400c5326edc..0804a082fc60d8ffa04fd85eb6820331029aa6e8 100644 (file)
@@ -620,7 +620,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;
@@ -644,8 +643,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);