summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
Diffstat (limited to 'poppler')
-rw-r--r--poppler/CairoOutputDev.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index ffd39ef7..80f7a99e 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -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();