diff options
author | Jihoon Kim <jihoon48.kim@samsung.com> | 2014-01-10 15:00:06 +0900 |
---|---|---|
committer | Jihoon Kim <jihoon48.kim@samsung.com> | 2014-01-10 15:00:06 +0900 |
commit | 84ed55e615ddfd8ac4b810903611ca8008cfc859 (patch) | |
tree | a0ebc2f69811e857165e930fbd20c1f284990a50 | |
parent | 4ebbc85d9c2c64fbd088e4144caa9f85416f2302 (diff) | |
download | elementary-84ed55e615ddfd8ac4b810903611ca8008cfc859.tar.gz |
test_dnd: avoid to create icon object that will be unused
-rw-r--r-- | src/bin/test_dnd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c index 4e6186ac7..90b70d869 100644 --- a/src/bin/test_dnd.c +++ b/src/bin/test_dnd.c @@ -956,13 +956,15 @@ void _enter_but_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED) static Eina_Bool _drop_but_icon_change_cb(void *data, Evas_Object *obj, Elm_Selection_Data *ev) { Evas_Object *win = data; - Evas_Object *ic = elm_icon_add(win); + Evas_Object *ic; + char *p = strchr(ev->data, '#'); if (!p) return EINA_FALSE; p++; char *p2 = strchr(p, '#'); if (!p2) return EINA_FALSE; *p2 = '\0'; + ic = elm_icon_add(win); elm_image_file_set(ic, p, NULL); evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); evas_object_del(elm_object_part_content_get(obj, "icon")); |