diff --git a/src/lib/image.c b/src/lib/image.c index ef7c33b..be35d34 100644 --- a/src/lib/image.c +++ b/src/lib/image.c @@ -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 (im->w == 0) + if ((loader_ret == 0) || (im->w == 0)) { /* if the caller wants an error return */ if (er)