Author: scooter
Date: 2010-11-03 17:23:55 -0700 (Wed, 03 Nov 2010)
New Revision: 22708
Modified:
cytoscape/trunk/application/src/main/java/cytoscape/layout/Tunable.java
Log:
Added robustness check to avoid NPE
Modified:
cytoscape/trunk/application/src/main/java/cytoscape/layout/Tunable.java
===================================================================
--- cytoscape/trunk/application/src/main/java/cytoscape/layout/Tunable.java
2010-11-04 00:22:28 UTC (rev 22707)
+++ cytoscape/trunk/application/src/main/java/cytoscape/layout/Tunable.java
2010-11-04 00:23:55 UTC (rev 22708)
@@ -1014,7 +1014,8 @@
dim.height = Math.min(list.length * 12, 300);
int maxString = 0;
for (int i = 0; i < list.length; i++)
- maxString = Math.max(list[i].toString().length(),
maxString);
+ if (list[i].toString() != null)
+ maxString =
Math.max(list[i].toString().length(), maxString);
dim.width = Math.min(maxString*12, 400);
return dim;
--
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.