From c396b327395751bc3fb20fecd3d643c3c6fd6b54 Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Thu, 5 Dec 2019 19:19:21 +0100 Subject: [PATCH] imlib2_load: Properly check non-full loads (load data too) --- src/bin/imlib2_load.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/imlib2_load.c b/src/bin/imlib2_load.c index 4c6817f..84bbce3 100644 --- a/src/bin/imlib2_load.c +++ b/src/bin/imlib2_load.c @@ -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)