summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-05-29 09:25:14 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-29 12:29:04 -0400
commit5e3532655b1d2c03aaaf107ef3eb37155d57f10b (patch)
treec8da6f2614d0f5ab33db261f1df5be3c93aa66d5
parentc83023565e391caa60aea5fdd884e9bbd2685a67 (diff)
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
-rw-r--r--src/lib/elementary/efl_ui_image.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 0aaed3ca30..8f23228e7d 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -804,17 +804,15 @@ _efl_ui_image_sizing_eval(Evas_Object *obj)
804 evas_object_size_hint_min_set(obj, minw, minh); 804 evas_object_size_hint_min_set(obj, minw, minh);
805 evas_object_size_hint_max_set(obj, maxw, maxh); 805 evas_object_size_hint_max_set(obj, maxw, maxh);
806 806
807 //Retained way. Nothing does, if either way hasn't been changed. 807 if (sd->img)
808 if (!sd->edje)
809 { 808 {
810 efl_gfx_image_orientation_set(sd->img, sd->orient); 809 //Retained way. Nothing does, if either way hasn't been changed.
811 } 810 if (!sd->edje)
811 efl_gfx_image_orientation_set(sd->img, sd->orient);
812 812
813 if (sd->img) 813 _image_sizing_eval(sd, sd->img);
814 { 814 if (sd->prev_img) _image_sizing_eval(sd, sd->prev_img);
815 _image_sizing_eval(sd, sd->img); 815 }
816 if (sd->prev_img) _image_sizing_eval(sd, sd->prev_img);
817 }
818} 816}
819 817
820static void 818static void