pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1694785 - /pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java
Date Sat, 08 Aug 2015 10:13:52 GMT
Author: tilman
Date: Sat Aug  8 10:13:51 2015
New Revision: 1694785

URL: http://svn.apache.org/r1694785
Log:
PDFBOX-2530: Avoid NPE if no file is open when switching view mode

Modified:
    pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java

Modified: pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java?rev=1694785&r1=1694784&r2=1694785&view=diff
==============================================================================
--- pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java (original)
+++ pdfbox/trunk/tools/src/main/java/org/apache/pdfbox/tools/PDFDebugger.java Sat Aug  8 10:13:51
2015
@@ -419,7 +419,10 @@ public class PDFDebugger extends JFrame
                     viewModeItem.setText("Show Internal Structure");
                     isPageMode = true;
                 }
-                initTree();
+                if (document != null)
+                {
+                    initTree();
+                }
             }
         });
         viewMenu.add(viewModeItem);



Mime
View raw message