From: Jihoon Kim Date: Tue, 17 Apr 2018 23:29:24 +0000 (+0900) Subject: Fix issue detected by static analysis tool X-Git-Tag: accepted/tizen/unified/20180420.081845~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53a84b8064bd060a518797d818c86f6ff9904be0;p=platform%2Fcore%2Fuifw%2Fise-default.git Fix issue detected by static analysis tool Return value of a function 'elm_object_part_text_get' is dereferenced at option.cpp:282 without checking, but it is usually checked for this function Change-Id: I0ec42e1139346370e8e12d0a3b7d298936d46b4f Signed-off-by: Jihoon Kim --- diff --git a/src/option.cpp b/src/option.cpp index 614afad..1e86c8e 100644 --- a/src/option.cpp +++ b/src/option.cpp @@ -279,7 +279,8 @@ static char* _accessible_body_name_cb(void *data, Evas_Object *obj) { Evas_Object *layout = (Evas_Object *)data; - return strdup(elm_object_part_text_get(layout, "elm.text")); + const char *text = elm_object_part_text_get(layout, "elm.text"); + return text ? strdup(text) : NULL; } static void