summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-06-05 17:01:25 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-06-05 17:09:19 +0900
commit5882d343f00cb7287548e154739dc09e6f8b737f (patch)
treefc5881f679f29688f9e2904b713707f24094f81d
parent67a91ddd5f8383f0a8eb7023ff4ee5306c080326 (diff)
efl.ui.image: fix icon_get API
If icon set is failed, icon_get should return NULL, not the old icon name. @fix
-rw-r--r--src/lib/elementary/efl_ui_image.c2
-rw-r--r--src/tests/elementary/elm_test_image.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index f1dcc259e1..b52013e3a3 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -1704,6 +1704,8 @@ _internal_efl_ui_image_icon_set(Evas_Object *obj, const char *name, Eina_Bool *f
1704 _efl_ui_image_sizing_eval(obj); 1704 _efl_ui_image_sizing_eval(obj);
1705 return EINA_TRUE; 1705 return EINA_TRUE;
1706 } 1706 }
1707 else
1708 eina_stringshare_replace(&sd->stdicon, NULL);
1707 1709
1708 if (_path_is_absolute(name)) 1710 if (_path_is_absolute(name))
1709 { 1711 {
diff --git a/src/tests/elementary/elm_test_image.c b/src/tests/elementary/elm_test_image.c
index 366b061c53..96ca9af305 100644
--- a/src/tests/elementary/elm_test_image.c
+++ b/src/tests/elementary/elm_test_image.c
@@ -197,7 +197,7 @@ START_TEST (efl_ui_image_icon)
197 ok = efl_ui_image_icon_set(image, "None"); 197 ok = efl_ui_image_icon_set(image, "None");
198 ck_assert(ok == 0); 198 ck_assert(ok == 0);
199 icon_name = efl_ui_image_icon_get(image); 199 icon_name = efl_ui_image_icon_get(image);
200 ck_assert_str_eq(icon_name, NULL); 200 ck_assert(icon_name == NULL);
201 201
202 elm_run(); 202 elm_run();
203 203