summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2013-07-29 00:55:43 +0200
committerAlbert Astals Cid <aacid@kde.org>2013-07-29 01:12:50 +0200
commite04287f2682e46831c04e0ef8d60411f521a2572 (patch)
treed4fbd02f323a4430b9a6dd97d07ffcd60c86978c
parentfe5ff20cb93a70fa1650ef5e00b67e35de20f0ca (diff)
Fallback to 1x1 bitmap If we fail to create the corrent one
-rw-r--r--poppler/SplashOutputDev.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index b11b695b..4d4e945b 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -15,7 +15,7 @@
//
// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2006 Stefan Schweizer <genstef@gentoo.org>
-// Copyright (C) 2006-2012 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006-2013 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
// Copyright (C) 2006 Scott Turner <scotty1024@mac.com>
// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
@@ -1385,6 +1385,12 @@ void SplashOutputDev::startPage(int pageNum, GfxState *state, XRef *xrefA) {
}
bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode,
colorMode != splashModeMono1, bitmapTopDown);
+ if (!bitmap->getDataPtr()) {
+ delete bitmap;
+ w = h = 1;
+ bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode,
+ colorMode != splashModeMono1, bitmapTopDown);
+ }
}
splash = new Splash(bitmap, vectorAntialias, &screenParams);
splash->setThinLineMode(thinLineMode);