From 0ee0a90061abdd8858b1b6141f0e705088df29e9 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 27 Sep 2022 01:07:13 +0200 Subject: SplashOutputDev::tilingPatternFill: Properly restore CTM on failure Fixes issue #1292 --- poppler/SplashOutputDev.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'poppler/SplashOutputDev.cc') diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index 58e27896..6ba98424 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -4457,6 +4457,9 @@ bool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat retValue = splash->drawImage(&tilingBitmapSrc, nullptr, &imgData, colorMode, true, result_width, result_height, matc, false, true) == splashOk; } delete tBitmap; + if (!retValue) { + state->setCTM(savedCTM[0], savedCTM[1], savedCTM[2], savedCTM[3], savedCTM[4], savedCTM[5]); + } return retValue; } -- cgit v1.2.3