Author: clopes
Date: 2012-06-04 12:00:30 -0700 (Mon, 04 Jun 2012)
New Revision: 29439
Modified:
core3/impl/trunk/filter-impl/src/main/java/org/cytoscape/filter/internal/filters/view/FilterSettingPanel.java
Log:
Fixed NPE
Modified:
core3/impl/trunk/filter-impl/src/main/java/org/cytoscape/filter/internal/filters/view/FilterSettingPanel.java
===================================================================
---
core3/impl/trunk/filter-impl/src/main/java/org/cytoscape/filter/internal/filters/view/FilterSettingPanel.java
2012-06-04 17:23:37 UTC (rev 29438)
+++
core3/impl/trunk/filter-impl/src/main/java/org/cytoscape/filter/internal/filters/view/FilterSettingPanel.java
2012-06-04 19:00:30 UTC (rev 29439)
@@ -202,17 +202,16 @@
private Class<?> getAttributeDataType(CyNetwork network, String
pAttribute, int pType) {
CyTable table = null;
- if (pType == QuickFind.INDEX_NODES && network.getNodeCount() >
0) {
- table = network.getDefaultNodeTable();
- } else if (pType == QuickFind.INDEX_EDGES &&
network.getEdgeCount() > 0) {
- table = network.getDefaultEdgeTable();
- } else {
- return null;
+ if (network != null) {
+ if (pType == QuickFind.INDEX_NODES &&
network.getNodeCount() > 0) {
+ table = network.getDefaultNodeTable();
+ } else if (pType == QuickFind.INDEX_EDGES &&
network.getEdgeCount() > 0) {
+ table = network.getDefaultEdgeTable();
+ }
}
- return table.getColumn(pAttribute).getType();
+ return table != null ? table.getColumn(pAttribute).getType() :
null;
}
-
private JComboBox getTextIndexComboBox(StringFilter pFilter){
TextIndexComboBox comboBox = null;
--
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.