loading: Don't look for cached image when not caching

This commit is contained in:
Kim Woelders 2022-07-08 20:03:56 +02:00
parent b39d33c800
commit 3f1f87b1fb
1 changed files with 27 additions and 24 deletions

View File

@ -379,6 +379,8 @@ __imlib_LoadImage(const char *file, ImlibLoadArgs * ila)
if (!file || file[0] == '\0') if (!file || file[0] == '\0')
return NULL; return NULL;
if (!ila->nocache)
{
/* see if we already have the image cached */ /* see if we already have the image cached */
im = __imlib_FindCachedImage(file, ila->frame); im = __imlib_FindCachedImage(file, ila->frame);
@ -414,6 +416,7 @@ __imlib_LoadImage(const char *file, ImlibLoadArgs * ila)
return im; return im;
} }
} }
}
im_file = im_key = NULL; im_file = im_key = NULL;
if (ila->fp) if (ila->fp)