forked from enlightenment/efl
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:
parent
c4ff2cde25
commit
f47c68ce9e
|
@ -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);
|
if (sd->f) eina_file_close(sd->f);
|
||||||
eina_stringshare_replace(&sd->file, eina_file_filename_get(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);
|
return _img_proxy_set(o, sd, NULL, f, buf, resize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue