summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-10-17 14:22:57 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2010-10-17 14:24:47 +0200
commit08c9678b0f8d972552487a89a5926341bcc634a2 (patch)
tree866df4a8358fe0730240af5eb0dc793d41ea694d
parent653b8da5bd6e50303207a2e8ccb5f5ad67db3767 (diff)
[cairo] Fix a crash when redering documents with invalid type 3 fonts
-rw-r--r--poppler/CairoFontEngine.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc
index 0a627aaf..25cf5b10 100644
--- a/poppler/CairoFontEngine.cc
+++ b/poppler/CairoFontEngine.cc
@@ -693,7 +693,7 @@ CairoType3Font *CairoType3Font::create(GfxFont *gfxFont, XRef *xref,
codeToGIDLen = 256;
for (i = 0; i < 256; ++i) {
codeToGID[i] = 0;
- if ((name = enc[i])) {
+ if (charProcs && (name = enc[i])) {
for (j = 0; j < charProcs->getLength(); j++) {
if (strcmp(name, charProcs->getKey(j)) == 0) {
codeToGID[i] = (Gushort) j;