diff options
-rw-r--r-- | mupdf/pdf_image.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mupdf/pdf_image.c b/mupdf/pdf_image.c index ce11b7be..c11433a7 100644 --- a/mupdf/pdf_image.c +++ b/mupdf/pdf_image.c @@ -296,9 +296,6 @@ pdf_loadimage(pdf_image **imgp, pdf_xref *xref, fz_obj *dict, fz_obj *ref) pdf_logimage("colorspace %s\n", cs->name); } - if (!cs) - return fz_throw("colorspace missing for image"); - /* * ImageMask, Mask and SoftMask */ @@ -322,6 +319,8 @@ pdf_loadimage(pdf_image **imgp, pdf_xref *xref, fz_obj *dict, fz_obj *ref) n = 0; a = 1; } + else if (!cs) + return fz_throw("colorspace missing for image"); obj = fz_dictgets(dict, "SMask"); if (fz_isindirect(obj)) |