diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2018-03-07 18:13:10 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2018-03-16 03:43:36 +0800 |
commit | c273fe1bda43197882adbd4fef4f417323131b53 (patch) | |
tree | 32d590a3a51eb985ee76e35fb52566da4cf734b7 /source/pdf/pdf-stream.c | |
parent | a3527d2839a83e7a764e979b696693db53069a75 (diff) | |
download | mupdf-c273fe1bda43197882adbd4fef4f417323131b53.tar.xz |
Do not warn if there are no JBIG2 globals.
Diffstat (limited to 'source/pdf/pdf-stream.c')
-rw-r--r-- | source/pdf/pdf-stream.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c index f5a3c99b..34ffe7af 100644 --- a/source/pdf/pdf-stream.c +++ b/source/pdf/pdf-stream.c @@ -200,10 +200,13 @@ build_filter(fz_context *ctx, fz_stream *chain, pdf_document *doc, pdf_obj *f, p { fz_jbig2_globals *globals = NULL; pdf_obj *obj = pdf_dict_get(ctx, p, PDF_NAME_JBIG2Globals); - if (!pdf_is_stream(ctx, obj)) - fz_warn(ctx, "jbig2 globals is not a stream, skipping globals"); - else - globals = pdf_load_jbig2_globals(ctx, doc, obj); + if (obj) + { + if (!pdf_is_stream(ctx, obj)) + fz_warn(ctx, "jbig2 globals is not a stream, skipping globals"); + else + globals = pdf_load_jbig2_globals(ctx, doc, obj); + } tmp = chain; chain = NULL; chain = fz_open_jbig2d(ctx, tmp, globals); |