Skip to content

Commit 31da503

Browse files
author
greatriver
committed
Fixed hd_catch bug of the pdf_open_document
1 parent 4994693 commit 31da503

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

source/pdf/pdf-repair.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pdf_repair_xref(hd_context *ctx, pdf_document *doc)
267267
hd_throw(ctx, HD_ERROR_GENERIC, "cannot tell in file");
268268

269269
hd_try(ctx)
270-
tok = pdf_lex_no_string(ctx, doc->file, buf);
270+
tok = pdf_lex_no_string(ctx, doc->file, buf);
271271
hd_catch(ctx)
272272
{
273273
hd_rethrow_if(ctx, HD_ERROR_TRYLATER);

source/pdf/pdf-xref.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,10 +1107,8 @@ pdf_open_document(hd_context *ctx, const char *filename)
11071107
}
11081108
hd_catch(ctx)
11091109
{
1110-
hd_drop_stream(ctx, file);
11111110
hd_drop_document(ctx, &doc->super);
11121111
hd_rethrow(ctx);
1113-
return NULL;
11141112
}
11151113
return doc;
11161114
}

0 commit comments

Comments
 (0)