evas image: Set load error on native image set failure

evas_object_image_native_surface_set() has no return, so without
setting load error we can't tell if it failed.

fix T5418
This commit is contained in:
Derek Foreman 2017-06-30 14:10:50 -05:00
parent bae9321c39
commit f45c0fcd67
1 changed files with 11 additions and 1 deletions

View File

@ -483,7 +483,17 @@ EAPI void
evas_object_image_native_surface_set(Evas_Object *eo_obj, Evas_Native_Surface *surf)
{
EVAS_IMAGE_API(eo_obj);
_evas_image_native_surface_set(eo_obj, surf);
Eina_Bool ret;
ret = _evas_image_native_surface_set(eo_obj, surf);
if (surf && !ret)
{
Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
o->load_error = EVAS_LOAD_ERROR_GENERIC;
}
}
EAPI Evas_Native_Surface *