From f45c0fcd67c8099e8ab527cdf1eb63dcf559f12d Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 30 Jun 2017 14:10:50 -0500 Subject: [PATCH] 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 --- src/lib/evas/canvas/evas_image_legacy.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index d73d90c..a8593db 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -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 * -- 2.7.4