evas - cserve2 - avoid segv accessing im->cache

This commit is contained in:
Carsten Haitzler 2014-01-13 08:50:52 +09:00
parent 93fd2263fc
commit 540d7f789c
1 changed files with 2 additions and 0 deletions

View File

@ -1372,6 +1372,7 @@ evas_cache_image_colorspace(Image_Entry *im, int cspace)
{ {
if (im->space == cspace) return; if (im->space == cspace) return;
im->space = cspace; im->space = cspace;
if (!im->cache) return;
im->cache->func.color_space(im, cspace); im->cache->func.color_space(im, cspace);
} }
@ -1396,6 +1397,7 @@ evas_cache_private_set(Evas_Cache_Image *cache, const void *data)
EAPI DATA32 * EAPI DATA32 *
evas_cache_image_pixels(Image_Entry *im) evas_cache_image_pixels(Image_Entry *im)
{ {
if (!im->cache) return NULL;
return im->cache->func.surface_pixels(im); return im->cache->func.surface_pixels(im);
} }