From: ChunEon Park Date: Fri, 15 Feb 2013 14:04:06 +0000 (+0000) Subject: elementary/widget - null conditional check X-Git-Tag: upstream/1.20.0~7116^2~14^2~5108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1004d5c06228ac43ef2f8702d1e147e7232d5813;p=platform%2Fupstream%2Fefl.git elementary/widget - null conditional check SVN revision: 83956 --- diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c index 0dbef16..83c9fa6 100644 --- a/legacy/elementary/src/lib/elm_widget.c +++ b/legacy/elementary/src/lib/elm_widget.c @@ -4092,19 +4092,28 @@ _elm_widget_theme_object_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) Elm_Widget_Smart_Data *sd = _pd; char buf[128]; + if (*ret) *ret = EINA_FALSE; + //Apply orientation styles. - switch (sd->orient_mode) - { - case 90: snprintf(buf, sizeof(buf), "%s/90", welement); - break; - case 180: snprintf(buf, sizeof(buf), "%s/180", welement); - break; - case 270: snprintf(buf, sizeof(buf), "%s/270", welement); - break; - default: strncpy(buf, welement, sizeof(buf)); - break; - } - *ret = _elm_theme_object_set(obj, edj, wname, buf, wstyle); + if (welement) + { + switch (sd->orient_mode) + { + case 90: + snprintf(buf, sizeof(buf), "%s/90", welement); + break; + case 180: + snprintf(buf, sizeof(buf), "%s/180", welement); + break; + case 270: + snprintf(buf, sizeof(buf), "%s/270", welement); + break; + default: + strncpy(buf, welement, sizeof(buf)); + break; + } + *ret = _elm_theme_object_set(obj, edj, wname, buf, wstyle); + } if (!*ret) { *ret = _elm_theme_object_set(obj, edj, wname, welement, wstyle);