summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-12-14 12:16:42 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-12-14 12:16:42 +0900
commit8ff8f79de4c146d9908247809c31b92d1c718810 (patch)
tree0e34c3cfb42971371e35f0c5a586920078618330
parent168163b34d437c895dde9a1209a347d6f02ba87b (diff)
widget: Return widget_create() function if orig_style is NULL.
This fixes coverity CID 1205011.
-rw-r--r--src/bin/widget.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/widget.c b/src/bin/widget.c
index c920f7b..04d41e6 100644
--- a/src/bin/widget.c
+++ b/src/bin/widget.c
@@ -2240,11 +2240,12 @@ widget_create(Evas_Object *parent, Widget_Type widget, const char *orig_style)
2240 Evas_Object *o = NULL; 2240 Evas_Object *o = NULL;
2241 const char *style = NULL; 2241 const char *style = NULL;
2242 2242
2243 if (orig_style) 2243 if (!orig_style) return NULL;
2244 style = eina_stringshare_add(_style_split_2(orig_style)); 2244
2245 //INF("widget : %s, orig_style : %s, style : %s", widget, orig_style, style); 2245 style = eina_stringshare_add(_style_split_2(orig_style));
2246 if (!style) 2246 if (!style)
2247 style = eina_stringshare_add("default"); 2247 style = eina_stringshare_add("default");
2248 //INF("widget : %s, orig_style : %s, style : %s", widget, orig_style, style);
2248 2249
2249#define ADD_WIDGET(name__, id__, style__) \ 2250#define ADD_WIDGET(name__, id__, style__) \
2250 else if (widget == id__) \ 2251 else if (widget == id__) \