[elm_genlist.c] Fixed elm_genlist_groupitem_add() bug.
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Sat, 30 Oct 2010 15:14:24 +0000 (00:14 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Sat, 30 Oct 2010 15:14:24 +0000 (00:14 +0900)
src/lib/elm_genlist.c

index b3cef21..d00317f 100644 (file)
@@ -3300,17 +3300,18 @@ EAPI Elm_Genlist_GroupItem *
 elm_genlist_groupitem_add(Evas_Object *obj, const Elm_Genlist_Item_Class *itc,
                        const void *data)
 {
-       Elm_Genlist_GroupItem *git;
-       Widget_Data *wd = elm_widget_data_get(obj);
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Elm_Genlist_GroupItem *git;
+   Widget_Data *wd = elm_widget_data_get(obj);
 
-       git = calloc(1, sizeof(Elm_Genlist_GroupItem));
-       if (!git) return NULL;
-       git->wd = wd;
-       git->itc = itc;
-       git->data = data;
+   git = calloc(1, sizeof(Elm_Genlist_GroupItem));
+   if (!git) return NULL;
+   git->wd = wd;
+   git->itc = itc;
+   git->data = data;
 
-       wd->group_items = eina_inlist_append(wd->group_items, EINA_INLIST_GET(git) );
-       return git;
+   wd->group_items = eina_inlist_append(wd->group_items, EINA_INLIST_GET(git) );
+   return git;
 }
 
 /**