diff options
-rw-r--r-- | source/pdf/pdf-stream.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/pdf/pdf-stream.c b/source/pdf/pdf-stream.c index 15014b38..f5a3c99b 100644 --- a/source/pdf/pdf-stream.c +++ b/source/pdf/pdf-stream.c @@ -200,7 +200,9 @@ 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_indirect(ctx, 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; |