[elm_genlist.c] Bug fix for null check.
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Tue, 18 Jan 2011 09:17:27 +0000 (18:17 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Tue, 18 Jan 2011 09:17:27 +0000 (18:17 +0900)
src/lib/elm_genlist.c

index 4068620..236d568 100644 (file)
@@ -3235,6 +3235,7 @@ elm_genlist_last_item_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
    if (!wd->items) return NULL;
    Elm_Genlist_Item *it = (Elm_Genlist_Item *)(wd->items->last);
    if (!wd) return NULL;