diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-05-05 19:44:01 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-05-05 19:44:34 +0100 |
commit | 9fab234064db56234918f76faa0afbf8e21c7e72 (patch) | |
tree | b9d0b120211a84d265875aec6846c35f0b061b95 | |
parent | 032e86f4aaf4d7972477849bb372da4a3c0ea8ea (diff) | |
download | efl-9fab234064db56234918f76faa0afbf8e21c7e72.tar.gz |
evas - fix seg on setting immage src if invalid obj
@fix
-rw-r--r-- | src/lib/evas/canvas/efl_canvas_proxy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_proxy.c b/src/lib/evas/canvas/efl_canvas_proxy.c index 9f626868e9..d55cbc2c31 100644 --- a/src/lib/evas/canvas/efl_canvas_proxy.c +++ b/src/lib/evas/canvas/efl_canvas_proxy.c @@ -8,6 +8,11 @@ _evas_image_proxy_source_set(Eo *eo_obj, Evas_Object *eo_src) { Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS); + if (!obj) + { + WRN("Image source %p not valid", eo_obj); + return EINA_FALSE; + } if (obj->delete_me && eo_src) { WRN("Setting deleted object %p as image source %p", eo_src, eo_obj); @@ -16,6 +21,11 @@ _evas_image_proxy_source_set(Eo *eo_obj, Evas_Object *eo_src) if (eo_src) { Evas_Object_Protected_Data *src = efl_data_scope_get(eo_src, EFL_CANVAS_OBJECT_CLASS); + if (!src) + { + WRN("Setting object %p not valid", eo_src); + return EINA_FALSE; + } if (src->delete_me) { WRN("Setting object %p to deleted image source %p", eo_src, eo_obj); |