summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-05-12 22:25:36 +0200
committerAlbert Astals Cid <aacid@kde.org>2017-05-12 22:25:36 +0200
commit0321bca7a3f6f5bd8b8f3e6ad13f4441e53c909b (patch)
treee78bc4030acff42d7bf2a25650f185c109bb9dba
parentd83b11300386c7f0364acff06bd809e9efcbe4ca (diff)
SplashOutputDev::doUpdateFont - Fix crash on broken file
-rw-r--r--poppler/SplashOutputDev.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 1158ccc2..4bdc79c2 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -2075,8 +2075,10 @@ reload:
delete id;
delete fontLoc;
fontLoc = NULL;
- if (fontsrc && !fontsrc->isFile)
+ if (fontsrc && !fontsrc->isFile) {
fontsrc->unref();
+ fontsrc = nullptr;
+ }
id = new SplashOutFontFileID(gfxFont->getID());
if ((fontFile = fontEngine->getFontFile(id))) {