Author: mes
Date: 2012-05-08 12:00:01 -0700 (Tue, 08 May 2012)
New Revision: 29148
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
Log:
fixed an npe in layout menus
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
===================================================================
---
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
2012-05-08 18:29:34 UTC (rev 29147)
+++
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/layout/ui/LayoutMenu.java
2012-05-08 19:00:01 UTC (rev 29148)
@@ -134,10 +134,13 @@
// Clear any previous entries
this.removeAll();
- // Figure out if we have anything selected
CyNetworkView view = appMgr.getCurrentNetworkView();
+ if ( view == null )
+ return;
+
CyNetwork network = view.getModel();
+ // Figure out if we have anything selected
boolean someSelected =
network.getDefaultNodeTable().countMatchingRows(CyNetwork.SELECTED, true) > 0;
boolean enableMenuItem = checkEnabled();
--
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.