Avoid redundant operations when non-existing file has no "key"

This commit is contained in:
Kim Woelders 2022-01-17 11:32:41 +01:00
parent 9afad50f97
commit cd6c00b1ce
1 changed files with 5 additions and 2 deletions

View File

@ -492,9 +492,12 @@ __imlib_LoadImage(const char *file, ImlibLoadArgs * ila)
err = __imlib_FileStat(file, &st);
if (err)
{
im_file = __imlib_FileRealFile(file);
im_key = __imlib_FileKey(file);
err = __imlib_FileStat(im_file, &st);
if (im_key)
{
im_file = __imlib_FileRealFile(file);
err = __imlib_FileStat(im_file, &st);
}
}
}