Author: pwang
Date: 2010-02-04 14:31:21 -0800 (Thu, 04 Feb 2010)
New Revision: 19189
Modified:
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
Log:
Handle null pointer exception
Modified:
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
===================================================================
---
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
2010-02-04 22:13:59 UTC (rev 19188)
+++
coreplugins/trunk/CytoscapeEditor2/src/cytoscape/editor/event/PaletteNetworkEditEventHandler.java
2010-02-04 22:31:21 UTC (rev 19189)
@@ -281,6 +281,10 @@
CyNetwork selectedNetwork = dlg.getSelectedNetwork();
+ if (selectedNetwork == null){
+ return;
+ }
+
// Create a new Node
String nodeID =
getSuggestedNodeID(selectedNetwork);//selectedNetwork.getIdentifier();//"node"
+ counter;
@@ -312,6 +316,10 @@
private String getSuggestedNodeID(CyNetwork pSelectedNetwork){
+ if (pSelectedNetwork == null){
+ return null;
+ }
+
String suggestedNodeID = pSelectedNetwork.getIdentifier();
while (true){
--
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.