summaryrefslogtreecommitdiff
path: root/src/lib/evas/cache2
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-01-13 15:42:14 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-01-14 14:23:04 +0900
commit35fd233d0c95afedc5507e4ebe165361b1425681 (patch)
treea393f124b11f3e9ad4d56b4e20dbfe6cf4d419b4 /src/lib/evas/cache2
parent038f4b4fcf468bec2324c72b31668a9cc39c9d74 (diff)
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.
Diffstat (limited to 'src/lib/evas/cache2')
-rw-r--r--src/lib/evas/cache2/evas_cache2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c
index 3e0fad6724..7d67447021 100644
--- a/src/lib/evas/cache2/evas_cache2.c
+++ b/src/lib/evas/cache2/evas_cache2.c
@@ -932,7 +932,12 @@ evas_cache2_image_scale_load(Image_Entry *im,
932 } 932 }
933 933
934 evas_cserve2_image_load_wait(ret); 934 evas_cserve2_image_load_wait(ret);
935 evas_cache2_image_load_data(ret); 935 error = evas_cache2_image_load_data(ret);
936 if (error != EVAS_LOAD_ERROR_NONE)
937 {
938 _evas_cache2_image_entry_delete(im->cache2, ret);
939 goto parent_out;
940 }
936 941
937 ret->references++; 942 ret->references++;
938 ret->w = dst_w; 943 ret->w = dst_w;