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.
This commit is contained in:
Jean-Philippe Andre 2016-09-01 11:17:08 +09:00
parent ed9413c1c1
commit caf237abdf
1 changed files with 6 additions and 0 deletions

View File

@ -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)
{