Fixed defect detected by static anlysis tool 34/97134/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Fri, 11 Nov 2016 08:22:56 +0000 (17:22 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Fri, 11 Nov 2016 08:22:56 +0000 (17:22 +0900)
Change-Id: I28abb9e766a14cd58c745039cd971cca58cd68fe

src/option.cpp

index bd3406e..8950499 100644 (file)
@@ -769,9 +769,11 @@ static void add_padding_area(Evas_Object *genlist)
 {
     /* Add padding area in wearable circle profile */
     Elm_Genlist_Item_Class *ptc = elm_genlist_item_class_new();
-    ptc->item_style = "padding";
-    elm_genlist_item_append(genlist, ptc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
-    elm_genlist_item_class_free(ptc);
+    if (ptc) {
+        ptc->item_style = "padding";
+        elm_genlist_item_append(genlist, ptc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+        elm_genlist_item_class_free(ptc);
+    }
 }
 #endif