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
This commit is contained in:
Mike Blumenkrantz 2015-12-20 11:07:14 -05:00
parent ae27542219
commit d0c95e2eef
1 changed files with 9 additions and 8 deletions

View File

@ -899,8 +899,6 @@ _elm_image_file_set_do(Evas_Object *obj)
EOLIAN static Eina_Bool
_elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const void *img, size_t size, const char *format, const char *key)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(img, EINA_FALSE);
_elm_image_file_set_do(obj);
evas_object_image_memfile_set
@ -911,8 +909,11 @@ _elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const void *img, size_t size
if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
{
ERR("Things are going bad for some random " FMT_SIZE_T
" byte chunk of memory (%p)", size, sd->img);
if (img)
ERR("Things are going bad for some random " FMT_SIZE_T
" byte chunk of memory (%p)", size, sd->img);
else
ERR("NULL image data passed (%p)", sd->img);
return EINA_FALSE;
}
@ -963,7 +964,6 @@ elm_image_file_set(Evas_Object *obj,
Eina_Bool ret = EINA_FALSE;
ELM_IMAGE_CHECK(obj) EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
eo_do(obj,
ret = efl_file_set(file, group);
elm_obj_image_sizing_eval());
@ -984,7 +984,6 @@ elm_image_mmap_set(Evas_Object *obj,
Eina_Bool ret = EINA_FALSE;
ELM_IMAGE_CHECK(obj) EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
eo_do(obj, ret = efl_file_mmap_set(file, group));
return ret;
}
@ -995,7 +994,6 @@ _elm_image_efl_file_mmap_set(Eo *obj, Elm_Image_Data *pd EINA_UNUSED,
{
Eina_Bool ret = EINA_FALSE;
EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
eo_do(obj,
ret = elm_obj_image_mmap_set(file, key),
elm_obj_image_sizing_eval());
@ -1023,7 +1021,10 @@ _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data *sd,
if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
{
ERR("Things are going bad for '%s' (%p)", file, sd->img);
if (file)
ERR("Things are going bad for '%s' (%p)", file, sd->img);
else
ERR("NULL image file passed (%p)", sd->img);
if (ret) *ret = EINA_FALSE;
return;
}