Author: mes
Date: 2011-01-19 10:50:43 -0800 (Wed, 19 Jan 2011)
New Revision: 23513

Modified:
   
core3/editor-impl/trunk/src/main/java/org/cytoscape/editor/internal/CurrentNetworkViewListener.java
Log:
a check to prevent npes

Modified: 
core3/editor-impl/trunk/src/main/java/org/cytoscape/editor/internal/CurrentNetworkViewListener.java
===================================================================
--- 
core3/editor-impl/trunk/src/main/java/org/cytoscape/editor/internal/CurrentNetworkViewListener.java
 2011-01-19 18:32:10 UTC (rev 23512)
+++ 
core3/editor-impl/trunk/src/main/java/org/cytoscape/editor/internal/CurrentNetworkViewListener.java
 2011-01-19 18:50:43 UTC (rev 23513)
@@ -20,7 +20,7 @@
 
        public void handleEvent(SetCurrentNetworkViewEvent e) {
                CyNetworkView view = e.getNetworkView();
-               if ( view.getModel().getNodeCount() == 0 ) {
+               if ( view != null && view.getModel().getNodeCount() == 0 ) {
                        CytoPanel west = app.getCytoPanel(CytoPanelName.WEST);
                        int compIndex = 
west.indexOfComponent(comp.getComponent());
                        west.setSelectedIndex( compIndex );

-- 
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