imlib2_load: Properly check non-full loads (load data too)

This commit is contained in:
Kim Woelders 2019-12-05 19:19:21 +01:00
parent 8e376b549f
commit c396b32739
1 changed files with 6 additions and 0 deletions

View File

@ -82,10 +82,12 @@ main(int argc, char **argv)
fprintf(fout, "Loading image: '%s'\n", argv[0]);
lerr = 0;
if (check_progress)
im = imlib_load_image_with_error_return(argv[0], &lerr);
else
im = imlib_load_image(argv[0]);
if (!im)
{
fprintf(fout, "*** Error %d loading image: %s\n", lerr, argv[0]);
@ -95,6 +97,10 @@ main(int argc, char **argv)
}
imlib_context_set_image(im);
if (!check_progress)
imlib_image_get_data();
imlib_free_image_and_decache();
if (check_progress && !progress_called)