Handle LibTIFF errors correctly

This commit is contained in:
Přemysl Eric Janouch 2023-06-13 13:46:55 +02:00
parent 8d5885bfdf
commit 0318424540
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 2 additions and 1 deletions

View File

@ -3039,7 +3039,8 @@ open_libtiff(
// We inform about unsupported directories, but do not fail on them.
GError *err = NULL;
if (!try_append_page(
load_libtiff_directory(tiff, &err), &result, &result_tail)) {
load_libtiff_directory(tiff, &err), &result, &result_tail) &&
err) {
add_warning(ctx, "%s", err->message);
g_error_free(err);
}