summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);