diff options
-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); } } |