From fdf62dd19d7fd6a90734be933073234f1ef89f95 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Fri, 11 Nov 2016 17:22:56 +0900 Subject: [PATCH] Fixed defect detected by static anlysis tool Change-Id: I28abb9e766a14cd58c745039cd971cca58cd68fe --- src/option.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/option.cpp b/src/option.cpp index bd3406e..8950499 100644 --- a/src/option.cpp +++ b/src/option.cpp @@ -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 -- 2.7.4