$OpenBSD: patch-xpdf_SplashOutputDev_cc,v 1.1 2005/08/11 14:18:47 naddy Exp $
--- xpdf/SplashOutputDev.cc.orig	Thu Jan 22 02:26:45 2004
+++ xpdf/SplashOutputDev.cc	Wed Aug 10 22:25:23 2005
@@ -621,16 +621,19 @@ void SplashOutputDev::updateFont(GfxStat
       }
       break;
     case fontTrueType:
-      if (!(ff = FoFiTrueType::load(fileName->getCString()))) {
-	goto err2;
+      if ((ff = FoFiTrueType::load(fileName->getCString()))) {
+	codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+	n = 256;
+	delete ff;
+      } else {
+	codeToGID = NULL;
+	n = 0;
       }
-      codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
-      delete ff;
       if (!(fontFile = fontEngine->loadTrueTypeFont(
 			   id,
 			   fileName->getCString(),
 			   fileName == tmpFileName,
-			   codeToGID, 256))) {
+			   codeToGID, n))) {
 	error(-1, "Couldn't create a font for '%s'",
 	      gfxFont->getName() ? gfxFont->getName()->getCString()
 	                         : "(unnamed)");
