summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-stream.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-03-07 18:13:10 +0100
committerSebastian Rasmussen <sebras@gmail.com>2018-03-16 03:43:36 +0800
commitc273fe1bda43197882adbd4fef4f417323131b53 (patch)
tree32d590a3a51eb985ee76e35fb52566da4cf734b7 /source/pdf/pdf-stream.c
parenta3527d2839a83e7a764e979b696693db53069a75 (diff)
downloadmupdf-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.c11
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);