Skip to content

Commit 3be4382

Browse files
committed
Fix JUnit failure
1 parent e61d073 commit 3be4382

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/task/postanalysis/CreatePANetworkTask.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,16 @@ private void layoutHubNodes(CyNetworkView networkView) {
265265
private void styleHubNodes(CyNetworkView networkView) {
266266
// make sure PA nodes don't have a chart obscuring them
267267
VisualLexicon lexicon = renderingEngineManager.getDefaultVisualLexicon();
268-
VisualProperty customPaint1 = lexicon.lookup(CyNode.class, "NODE_CUSTOMGRAPHICS_1");
269-
Object nullCustomGraphics = customPaint1.getDefault();
270-
271-
for(CyNode node : nodeCache.values()) {
272-
View<CyNode> nodeView = networkView.getNodeView(node);
273-
nodeView.setLockedValue(customPaint1, nullCustomGraphics);
268+
if(lexicon != null) {
269+
VisualProperty customPaint1 = lexicon.lookup(CyNode.class, "NODE_CUSTOMGRAPHICS_1");
270+
if(customPaint1 != null) {
271+
Object nullCustomGraphics = customPaint1.getDefault();
272+
273+
for(CyNode node : nodeCache.values()) {
274+
View<CyNode> nodeView = networkView.getNodeView(node);
275+
nodeView.setLockedValue(customPaint1, nullCustomGraphics);
276+
}
277+
}
274278
}
275279
}
276280

0 commit comments

Comments
 (0)