Commit 19ebd405 authored by Albert Astals Cid's avatar Albert Astals Cid

CairoOutputDev: Fix crash in broken files

Bug #103016
parent 7ee9dade
......@@ -2714,7 +2714,9 @@ void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *s
for (y = 0; y < maskHeight; y++) {
maskDest = (unsigned char *) (maskBuffer + y * row_stride);
pix = maskImgStr->getLine();
maskColorMap->getGrayLine (pix, maskDest, maskWidth);
if (likely(pix != nullptr)) {
maskColorMap->getGrayLine (pix, maskDest, maskWidth);
}
}
maskImgStr->close();
......
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