Revert "__imlib_LoadImage(): Additionally check loader_ret to detect loader failures"

This reverts commit a104e317ce.

Breaks image loading in certain situations.

It seems that some loaders may return 0 even when load() "succeeds".

This appears to happen with the jpeg loader when not loading data
immediately (but only reading the header).
In this case jpeg_finish_decompress() exits via _JPEGFatalErrorHandler()
-> longjmp() causing the return code to be 0.

The fix reverted here is probably basically correct, but it will have to
wait until the loaders are fixed to behave properly.
This commit is contained in:
Kim Woelders 2014-12-14 16:38:48 +01:00
parent 0c34e1bfe2
commit 55ddd412c3
1 changed files with 1 additions and 1 deletions

View File

@ -1048,7 +1048,7 @@ __imlib_LoadImage(const char *file, ImlibProgressFunction progress,
im->loader = best_loader;
/* all loaders have been tried and they all failed. free the skeleton */
/* image struct we had and return NULL */
if ((loader_ret == 0) || (im->w == 0))
if (im->w == 0)
{
/* if the caller wants an error return */
if (er)