Commit bdf48aae authored by Leonardo Taccari's avatar Leonardo Taccari Committed by Sebastian Ramacher

document.c: pass NULL as the 4th argument to pdf_save_document()

Passing a `{ 0 }' as 4th argument to pdf_save_document() is no longer needed.
Just pass NULL and get rid of opts.

At least in recent mupdf (version 1.9a) `*in_opts' (the 4th argument of
pdf_save_document()) is checked if NULL and in that case the default options are
Signed-off-by: default avatarSebastian Ramacher <>
parent e3e49d20
Pipeline #136 skipped
...@@ -109,12 +109,7 @@ pdf_document_save_as(zathura_document_t* document, mupdf_document_t* ...@@ -109,12 +109,7 @@ pdf_document_save_as(zathura_document_t* document, mupdf_document_t*
} }
fz_try (mupdf_document->ctx) { fz_try (mupdf_document->ctx) {
/* pdf_save_document claims to accepts NULL as third argument but doesn't. pdf_save_document(mupdf_document->ctx, (pdf_document*) mupdf_document->document, (char*) path, NULL);
* pdf_write_document does not check if the third arguments is NULL for some
* options. */
pdf_write_options opts = { 0 }; /* just use the default options */
pdf_save_document(mupdf_document->ctx, (pdf_document*) mupdf_document->document, (char*) path, &opts);
} fz_catch (mupdf_document->ctx) { } fz_catch (mupdf_document->ctx) {
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment