Fix issue detected by static analysis tool 82/96482/2
authorInHong Han <inhong1.han@samsung.com>
Wed, 9 Nov 2016 06:54:09 +0000 (15:54 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 9 Nov 2016 07:02:22 +0000 (16:02 +0900)
Change-Id: I00f0823e41e39796d2d0ef241ba7af8e1c8e405a

src/eflutil.cpp

index 69edf6f..cad7ba8 100644 (file)
@@ -72,6 +72,10 @@ void add_scrollable_title_area(Evas_Object *genlist, const char *title, Eina_Boo
     /* Add scrollable title area in wearable profile */
     Elm_Object_Item *it;
     Elm_Genlist_Item_Class *ttc = elm_genlist_item_class_new();
+
+    if (!ttc)
+        return;
+
     ttc->item_style = "title";
     ttc->func.text_get = title ? _title_text_get : NULL;
     it = elm_genlist_item_append(genlist, ttc, title, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
@@ -80,5 +84,4 @@ void add_scrollable_title_area(Evas_Object *genlist, const char *title, Eina_Boo
 
     if (autoscroll)
         evas_object_smart_callback_add(genlist, "realized", gl_realized_cb, NULL);
-}
-
+}
\ No newline at end of file