Author: pwang
Date: 2012-04-02 15:45:09 -0700 (Mon, 02 Apr 2012)
New Revision: 28716

Modified:
   
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
Log:
Fixed bug#832

Modified: 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
===================================================================
--- 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
 2012-04-02 22:23:53 UTC (rev 28715)
+++ 
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
 2012-04-02 22:45:09 UTC (rev 28716)
@@ -671,7 +671,15 @@
                                if (row != -1) {
                                        JTree tree = treeTable.getTree();
                                        TreePath treePath = 
tree.getPathForRow(row);
-                                       Long networkID = ((NetworkTreeNode) 
treePath.getLastPathComponent()).getNetwork().getSUID();
+                                       
+                                       Long networkID = -1L;
+                                       try {
+                                               networkID = ((NetworkTreeNode) 
treePath.getLastPathComponent()).getNetwork().getSUID();                        
                 
+                                       }
+                                       catch (NullPointerException nullExp){
+                                               //The tree root does not 
represent a network, ignore it.
+                                               return;
+                                       }
 
                                        CyNetwork cyNetwork = 
netmgr.getNetwork(networkID);
 

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to