diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-06-18 19:10:17 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-06-27 20:29:54 +0800 |
commit | 42c414870c1ff69b427eccb1d334c7cfbd1f0731 (patch) | |
tree | a18859c815e02b904a762d25187bf3d6aea2a2b0 /source | |
parent | c84d35eab55fbb16a61b7adc5a3ca91820ca1746 (diff) | |
download | mupdf-42c414870c1ff69b427eccb1d334c7cfbd1f0731.tar.xz |
Drop document in case of error.
Diffstat (limited to 'source')
-rw-r--r-- | source/tools/mudraw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 34f9778f..5de7e0a1 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -1715,12 +1715,13 @@ int mudraw_main(int argc, char **argv) } fz_catch(ctx) { + fz_drop_document(ctx, doc); + doc = NULL; + if (!ignore_errors) fz_rethrow(ctx); bgprint_flush(); - fz_drop_document(ctx, doc); - doc = NULL; fz_warn(ctx, "ignoring error in '%s'", filename); } } |