diff options
author | yzrh <yzrh@noema.org> | 2022-12-30 20:16:53 +0000 |
---|---|---|
committer | yzrh <yzrh@noema.org> | 2022-12-30 20:16:53 +0000 |
commit | 1d899d934d26a5e19333712deb50c39b3843076d (patch) | |
tree | bf932b809e3bcb1512d31c24adf1d059cccfa8ce /src | |
parent | 226f16ddf41619caea347228322851835b4d1045 (diff) | |
download | melon-1d899d934d26a5e19333712deb50c39b3843076d.tar.gz melon-1d899d934d26a5e19333712deb50c39b3843076d.tar.zst |
Fix PDF object check.
Signed-off-by: yzrh <yzrh@noema.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/cnki_pdf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cnki_pdf.c b/src/cnki_pdf.c index 45f5324..72500ab 100644 --- a/src/cnki_pdf.c +++ b/src/cnki_pdf.c @@ -328,7 +328,9 @@ cnki_pdf(cnki_t **param) printf("Root object is %d.\n", root); } - if (pdf_get_obj(&pdf, root, NULL) != 0) { + pdf_object_t *tmp; + + if (pdf_get_obj(&pdf, root, &tmp) != 0) { if ((*param)->stat > 0) printf("Root object is missing\n"); @@ -423,8 +425,6 @@ cnki_pdf(cnki_t **param) if ((*param)->stat > 1) printf("Deleting xref object\n"); - pdf_object_t *tmp; - pdf_get_obj(&pdf, xref, &tmp); pdf_obj_del(&pdf, xref); @@ -1106,7 +1106,7 @@ cnki_pdf_hn(cnki_t **param) return 1; } - pdf_object_t *tmp = NULL; + pdf_object_t *tmp; /* Add /Parent to page object */ for (int i = 0; i < (*param)->file_stat->page; i++) { |