[Elm_Gengrid] Added NULL check for gengrid item and its item content. Very
authorprince <prince.dubey@samsung.com>
Thu, 26 Jul 2012 13:26:57 +0000 (18:56 +0530)
committerprince <prince.dubey@samsung.com>
Thu, 26 Jul 2012 13:42:11 +0000 (19:12 +0530)
few times it->item is getting NULL, giving segfault.

Change-Id: Ia0e02382d23025635223c3327353262f501b5e35

src/lib/elm_gengrid.c

index 8ee50c4..97f23f2 100644 (file)
@@ -1056,6 +1056,8 @@ _reorder_item_move_animator_cb(void *data)
    double tt, t;
    Evas_Coord dx, dy;
 
+   if (!it || !it->item) return ECORE_CALLBACK_CANCEL;
+
    tt = REORDER_EFFECT_TIME;
    t = ((0.0 > (t = ecore_loop_time_get()-it->item->moving_effect_start_time)) ? 0.0 : t);
    dx = ((it->item->tx - it->item->ox) / 10) * _elm_config->scale;