Evas/cserve2: Fix crash on image file change

When an image file is changed, it is discarded from cserve2,
so the references become invalid. In case we were loading a
scaled version of that image, no proper error checking was
done, leading to obvious crashes.
This commit is contained in:
Jean-Philippe Andre 2014-01-13 15:42:14 +09:00
parent 038f4b4fcf
commit 35fd233d0c
1 changed files with 6 additions and 1 deletions

View File

@ -932,7 +932,12 @@ evas_cache2_image_scale_load(Image_Entry *im,
}
evas_cserve2_image_load_wait(ret);
evas_cache2_image_load_data(ret);
error = evas_cache2_image_load_data(ret);
if (error != EVAS_LOAD_ERROR_NONE)
{
_evas_cache2_image_entry_delete(im->cache2, ret);
goto parent_out;
}
ret->references++;
ret->w = dst_w;