efl_ui_image: Call unload file when calling file_set

Summary:
We have checked that unload is not called even if different files
call again elm_image_file_set on the same object.
If file_set is called repeatedly, I think a potential error can occur.
So, modify to call unload when doing file_set by referring to efl_ui_zoomable.

Test Plan: N/A

Reviewers: Hermet, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11148
This commit is contained in:
junsu choi 2020-01-22 11:57:26 -05:00 committed by Mike Blumenkrantz
parent baa7870082
commit 93bd970259
1 changed files with 1 additions and 0 deletions

View File

@ -999,6 +999,7 @@ _efl_ui_image_smart_internal_file_set(Eo *obj, Efl_Ui_Image_Data *sd)
const Eina_File *f;
const char *key;
const char *file = efl_file_get(obj);
efl_file_unload(obj);
if (eina_str_has_extension(file, ".edj"))
return _efl_ui_image_edje_file_set(obj);