[poppler] Branch 'poppler-0.10' - poppler/TextOutputDev.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Oct 12 05:21:28 PDT 2008
poppler/TextOutputDev.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit d313c3029b09e043a5f68f7b0e7286aee2efbe13
Author: Albert Astals Cid <aacid at kde.org>
Date: Sun Oct 12 14:20:01 2008 +0200
Do not crash if there is not font
See bug 18023 for more info
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index e5ce643..85a9dbf 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -1941,6 +1941,7 @@ void TextPage::updateFont(GfxState *state) {
}
void TextPage::beginWord(GfxState *state, double x0, double y0) {
+ GfxFont *gfxFont;
double *fontm;
double m[4], m2[4];
int rot;
@@ -1955,7 +1956,8 @@ void TextPage::beginWord(GfxState *state, double x0, double y0) {
// compute the rotation
state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]);
- if (state->getFont()->getType() == fontType3) {
+ gfxFont = state->getFont();
+ if (gfxFont && gfxFont->getType() == fontType3) {
fontm = state->getFont()->getFontMatrix();
m2[0] = fontm[0] * m[0] + fontm[1] * m[2];
m2[1] = fontm[0] * m[1] + fontm[1] * m[3];
More information about the poppler
mailing list