$NetBSD: patch-ab,v 1.5 2005/09/07 15:19:08 adam Exp $

--- xpdf/XPDFViewer.cc.orig	2005-08-17 05:34:31.000000000 +0000
+++ xpdf/XPDFViewer.cc
@@ -175,9 +175,12 @@ XPDFViewer::XPDFViewer(XPDFApp *appA, GS
 
 XPDFViewer::~XPDFViewer() {
   delete core;
-  XmFontListFree(aboutBigFont);
-  XmFontListFree(aboutVersionFont);
-  XmFontListFree(aboutFixedFont);
+  if(aboutBigFont)
+    XmFontListFree(aboutBigFont);
+  if(aboutVersionFont)
+    XmFontListFree(aboutVersionFont);
+  if(aboutFixedFont)
+    XmFontListFree(aboutFixedFont);
   closeWindow();
 #ifndef DISABLE_OUTLINE
   if (outlineLabels) {
