From: Mike Blumenkrantz Date: Wed, 29 May 2019 13:25:14 +0000 (-0400) Subject: efl_ui/image: check image object existence before using it in sizing X-Git-Tag: accepted/tizen/unified/20190604.014647~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=326f2f531e0c50085a209684250429f6e99ac123;p=platform%2Fupstream%2Fefl.git efl_ui/image: check image object existence before using it in sizing Summary: when triggered before the image is loaded, this code cannot be run @fix Depends on D8978 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8979 --- diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 11305e9..b4abeec 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -820,17 +820,15 @@ _efl_ui_image_sizing_eval(Evas_Object *obj) evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_max_set(obj, maxw, maxh); - //Retained way. Nothing does, if either way hasn't been changed. - if (!sd->edje) + if (sd->img) { - efl_gfx_image_orientation_set(sd->img, sd->orient); - } + //Retained way. Nothing does, if either way hasn't been changed. + if (!sd->edje) + efl_gfx_image_orientation_set(sd->img, sd->orient); - if (sd->img) - { - _image_sizing_eval(sd, sd->img); - if (sd->prev_img) _image_sizing_eval(sd, sd->prev_img); - } + _image_sizing_eval(sd, sd->img); + if (sd->prev_img) _image_sizing_eval(sd, sd->prev_img); + } } static void