patch from matt

SVN revision: 4116
This commit is contained in:
Carsten Haitzler 2001-01-13 07:40:11 +00:00
parent b55b892198
commit 8cb5f5dc04
1 changed files with 6 additions and 3 deletions

View File

@ -1148,9 +1148,12 @@ __imlib_LoadImage(const char *file, ImlibProgressFunction progress,
*er = LOAD_ERROR_OUT_OF_MEMORY;
else if (errno == EMFILE)
*er = LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS;
/* free the stuct we created */
__imlib_ConsumeImage(im);
return NULL;
if (*er != LOAD_ERROR_UNKNOWN)
{
/* free the stuct we created */
__imlib_ConsumeImage(im);
return NULL;
}
}
errno = 0;
}