diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2018-08-08 15:56:02 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-08-08 15:56:03 +0900 |
commit | f47c68ce9edf524040357a2992fab097ee40c7d9 (patch) | |
tree | e37fd4ab3fc67ac55a78dee12d11b0ae79778859 | |
parent | c4ff2cde25a1396eaccb7591175b7675aaa9bd9e (diff) | |
download | efl-f47c68ce9edf524040357a2992fab097ee40c7d9.tar.gz |
efl_ui/image_zoomable: fix internal eina file refcounting
Summary:
this pointer is owned by elm_theme, not the image, so the image refcount
must be increased in order to avoid accidentally closing the file which is
still in use by elm_theme and triggering a crash
this resolves the crash in the `efl_ui_image_zoomable_icon` test
Reviewers: Hermet
Reviewed By: Hermet
Subscribers: #reviewers, cedric, #committers
Tags: #efl_widgets
Differential Revision: https://phab.enlightenment.org/D6774
-rw-r--r-- | src/lib/elementary/efl_ui_image_zoomable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 4a31c41c0e..7526260747 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -2831,7 +2831,7 @@ _image_zoomable_object_icon_set(Evas_Object *o, const char *group, char *style, { if (sd->f) eina_file_close(sd->f); eina_stringshare_replace(&sd->file, eina_file_filename_get(f)); - sd->f = f; + sd->f = eina_file_dup(f); return _img_proxy_set(o, sd, NULL, f, buf, resize); } |