fofi/FoFiType1C.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit f60fb04f8ce0944f812dda2df8170941bfc3e84c Author: Albert Astals Cid <[email protected]> Date: Fri Jul 30 19:29:12 2010 +0100 Do not crash when using pdftops in some files Fixes crash in file in kde bug 246269. The output is still wrong though diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc index 43deb19..9c5b10c 100644 --- a/fofi/FoFiType1C.cc +++ b/fofi/FoFiType1C.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2009 Albert Astals Cid <[email protected]> +// Copyright (C) 2009, 2010 Albert Astals Cid <[email protected]> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -804,10 +804,12 @@ void FoFiType1C::convertToType0(char *psName, //~ to handle multiple FDs correctly, need to somehow divide the //~ font up by FD; as a kludge we ignore CID 0, which is .notdef fd = 0; - for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) { - if (cidMap[i+j] >= 0) { - fd = fdSelect[cidMap[i+j]]; - break; + if (fdSelect != NULL) { + for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) { + if (cidMap[i+j] >= 0) { + fd = fdSelect[cidMap[i+j]]; + break; + } } } _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
