[prevent] resolve check_after_deref
authorJongmin Lee <jm105.lee@samsung.com>
Wed, 17 Apr 2013 01:30:08 +0000 (10:30 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Fri, 19 Apr 2013 05:03:20 +0000 (14:03 +0900)
Change-Id: If12a50d746af977a93a3e28eddad8838a3974c77

src/lib/elm_gengrid.c

index 3c70169..3c260fa 100644 (file)
@@ -3968,9 +3968,12 @@ static void
 _item_fx_done(Elm_Transit_Effect *data, Elm_Transit *transit __UNUSED__)
 {
    Elm_Gen_FX_Item *fx_done_it = data;
-   Elm_Gengrid_Smart_Data *sd = GG_IT(fx_done_it->it)->wsd;
+   Elm_Gengrid_Smart_Data *sd;
+
+   if ((!fx_done_it) || (!fx_done_it->it)) return;
 
-   if ((!fx_done_it) || (!fx_done_it->it) || (!sd)) return;
+   sd = GG_IT(fx_done_it->it)->wsd;
+   if (!sd) return;
 
    evas_object_image_source_visible_set(fx_done_it->proxy, EINA_TRUE);
    evas_object_lower(fx_done_it->proxy);
@@ -3988,9 +3991,12 @@ _item_fx_del_cb(void *data, Elm_Transit *transit __UNUSED__)
    Elm_Gen_Item *it = NULL;
    Proxy_Item *pi = NULL;
    Eina_List *l;
-   Elm_Gengrid_Smart_Data *sd = GG_IT(fx_done_it->it)->wsd;
+   Elm_Gengrid_Smart_Data *sd;
+
+   if ((!fx_done_it) || (!fx_done_it->it)) return;
 
-   if ((!fx_done_it) || (!fx_done_it->it) || (!sd)) return;
+   sd = GG_IT(fx_done_it->it)->wsd;
+   if (!sd) return;
 
    sd->fx_items = eina_list_remove(sd->fx_items, fx_done_it);
    free(fx_done_it);