Gengrid: Fix for crashes in _item_show_region 12/114912/2 accepted/tizen/3.0/common/20170221.125311 accepted/tizen/3.0/ivi/20170221.023346 accepted/tizen/3.0/mobile/20170221.022958 accepted/tizen/3.0/tv/20170221.023133 accepted/tizen/3.0/wearable/20170221.023233 submit/tizen_3.0/20170220.063553
authorGodly T.Alias <godlytalias@yahoo.co.in>
Wed, 15 Feb 2017 12:26:51 +0000 (17:56 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 20 Feb 2017 05:54:10 +0000 (21:54 -0800)
Change-Id: Ia13561f336151000ed139c818e6b9728d4fe46b4
Signed-off-by: Godly T.Alias <godlytalias@yahoo.co.in>
src/lib/elm_gengrid.c

index 7e54ac7258175ae19105438bb0337750c7b0bd45..b54ec70cbd6c95c3900b0d3b5c076e5674d05e8b 100644 (file)
@@ -575,12 +575,14 @@ _item_show_region(void *data)
              eo_do(WIDGET(it), elm_interface_scrollable_content_region_show(
                    it_xpos, it_ypos, vw, vh));
              sd->show_region = EINA_FALSE;
+             sd->show_it = NULL;
           }
         if (sd->bring_in)
           {
              eo_do(WIDGET(it), elm_interface_scrollable_region_bring_in(
                    it_xpos, it_ypos, vw, vh));
              sd->bring_in = EINA_FALSE;
+             sd->bring_in_it = NULL;
           }
      }
 }
@@ -4219,6 +4221,16 @@ _elm_gengrid_item_del_not_serious(Elm_Gen_Item *it)
      sd->focused_item = NULL;
    if (sd->last_focused_item == eo_it)
      sd->last_focused_item = NULL;
+   if (sd->show_it == eo_it)
+     {
+        sd->show_it = NULL;
+        sd->show_region = EINA_FALSE;
+     }
+   else if (sd->bring_in_it == eo_it)
+     {
+        sd->bring_in_it = NULL;
+        sd->bring_in = EINA_FALSE;
+     }
 
    if (it->itc->func.del)
      it->itc->func.del((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it));