pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1780094 - /pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java
Date Tue, 24 Jan 2017 17:09:45 GMT
Author: tilman
Date: Tue Jan 24 17:09:45 2017
New Revision: 1780094

URL: http://svn.apache.org/viewvc?rev=1780094&view=rev
Log:
PDFBOX-2941: avoid NPE when clicking when no file is open

Modified:
    pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java

Modified: pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java?rev=1780094&r1=1780093&r2=1780094&view=diff
==============================================================================
--- pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java (original)
+++ pdfbox/trunk/debugger/src/main/java/org/apache/pdfbox/debugger/ui/Tree.java Tue Jan 24
17:09:45 2017
@@ -76,6 +76,10 @@ public class Tree extends JTree
         if (event != null)
         {
             TreePath path = getClosestPathForLocation(event.getX(), event.getY());
+            if (path == null)
+            {
+                return null;
+            }
             setSelectionPath(path);
             treePopupMenu.removeAll();
             addPopupMenuItems(path);



Mime
View raw message