summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-12-20 11:07:14 -0500
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-12-21 08:53:51 +0900
commit655f48e3150fddf64048b7e5eade2fb246c867f1 (patch)
tree260253354eebb400b8a1313c833626cd9ee0761c
parenta470e464afca3f2d9568d6c5318b86158f83ae47 (diff)
image: do not block null image loading in the elm layer
this is handled correctly in evas. checking load errors from the engine/loaders is sufficient, but the printed ERR messages for these cases have been improved partially reverts 865383aa0da5d1eb6d29f4ed5447a73f63800a33 reverts ee7d5425628942a45e23a2cb6be253db8ec0b3fd ref 840dcc618ead292414b0de64a7a3ae38d778311f ref a915229dc87606472480a8b2eacce9514055ac27 fix Titalia
-rw-r--r--src/lib/elm_image.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c
index f76eb9ac8..b7d5482e9 100644
--- a/src/lib/elm_image.c
+++ b/src/lib/elm_image.c
@@ -893,8 +893,6 @@ _elm_image_file_set_do(Evas_Object *obj)
893EOLIAN static Eina_Bool 893EOLIAN static Eina_Bool
894_elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const void *img, size_t size, const char *format, const char *key) 894_elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const void *img, size_t size, const char *format, const char *key)
895{ 895{
896 EINA_SAFETY_ON_NULL_RETURN_VAL(img, EINA_FALSE);
897
898 _elm_image_file_set_do(obj); 896 _elm_image_file_set_do(obj);
899 897
900 evas_object_image_memfile_set 898 evas_object_image_memfile_set
@@ -905,8 +903,11 @@ _elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const void *img, size_t size
905 903
906 if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE) 904 if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
907 { 905 {
908 ERR("Things are going bad for some random " FMT_SIZE_T 906 if (img)
909 " byte chunk of memory (%p)", size, sd->img); 907 ERR("Things are going bad for some random " FMT_SIZE_T
908 " byte chunk of memory (%p)", size, sd->img);
909 else
910 ERR("NULL image data passed (%p)", sd->img);
910 return EINA_FALSE; 911 return EINA_FALSE;
911 } 912 }
912 913
@@ -957,7 +958,6 @@ elm_image_file_set(Evas_Object *obj,
957 Eina_Bool ret = EINA_FALSE; 958 Eina_Bool ret = EINA_FALSE;
958 959
959 ELM_IMAGE_CHECK(obj) EINA_FALSE; 960 ELM_IMAGE_CHECK(obj) EINA_FALSE;
960 EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
961 eo_do(obj, 961 eo_do(obj,
962 ret = efl_file_set(file, group); 962 ret = efl_file_set(file, group);
963 elm_obj_image_sizing_eval()); 963 elm_obj_image_sizing_eval());
@@ -978,7 +978,6 @@ elm_image_mmap_set(Evas_Object *obj,
978 Eina_Bool ret = EINA_FALSE; 978 Eina_Bool ret = EINA_FALSE;
979 979
980 ELM_IMAGE_CHECK(obj) EINA_FALSE; 980 ELM_IMAGE_CHECK(obj) EINA_FALSE;
981 EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
982 eo_do(obj, ret = efl_file_mmap_set(file, group)); 981 eo_do(obj, ret = efl_file_mmap_set(file, group));
983 return ret; 982 return ret;
984} 983}
@@ -989,7 +988,6 @@ _elm_image_efl_file_mmap_set(Eo *obj, Elm_Image_Data *pd EINA_UNUSED,
989{ 988{
990 Eina_Bool ret = EINA_FALSE; 989 Eina_Bool ret = EINA_FALSE;
991 990
992 EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
993 eo_do(obj, 991 eo_do(obj,
994 ret = elm_obj_image_mmap_set(file, key), 992 ret = elm_obj_image_mmap_set(file, key),
995 elm_obj_image_sizing_eval()); 993 elm_obj_image_sizing_eval());
@@ -1017,7 +1015,10 @@ _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data *sd,
1017 1015
1018 if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE) 1016 if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
1019 { 1017 {
1020 ERR("Things are going bad for '%s' (%p)", file, sd->img); 1018 if (file)
1019 ERR("Things are going bad for '%s' (%p)", file, sd->img);
1020 else
1021 ERR("NULL image file passed (%p)", sd->img);
1021 if (ret) *ret = EINA_FALSE; 1022 if (ret) *ret = EINA_FALSE;
1022 return; 1023 return;
1023 } 1024 }