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
This commit is contained in:
Mike Blumenkrantz 2018-08-08 15:56:02 +09:00 committed by Hermet Park
parent c4ff2cde25
commit f47c68ce9e
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}