From: Jean-Philippe Andre Date: Thu, 1 Sep 2016 02:17:08 +0000 (+0900) Subject: evas: Fix unlikely crash with image cache X-Git-Tag: upstream/1.20.0~4539 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=caf237abdf52422497d3cb4a6af123fbb4ce2e85;p=platform%2Fupstream%2Fefl.git evas: Fix unlikely crash with image cache This happened to me when running elm_suite manually, during elm_shutdown. At this point, cache shouldn't be null, but better be safe anyway. --- diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 21edc94..a0c6a65 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -250,6 +250,12 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache, { Image_Entry *ie; + if (!cache) + { + *error = EVAS_LOAD_ERROR_GENERIC; + return NULL; + } + ie = cache->func.alloc(); if (!ie) {