Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Commit

Permalink
Fix NPE when loading a graph with Giant Component Filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mbastian committed Sep 29, 2011
1 parent 908cb1a commit 95fe16d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public static class GiantComponentFilter implements NodeFilter {
private AttributeColumn column;

public GiantComponentFilter() {
attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();
}

public boolean init(Graph graph) {
Expand All @@ -93,6 +92,7 @@ public boolean init(Graph graph) {
undirectedGraph = graph.getView().getGraphModel().getHierarchicalUndirectedGraph(graph.getView());
}

attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel(graph.getGraphModel().getWorkspace());
cc.weaklyConnected(undirectedGraph, attributeModel);
componentId = cc.getGiantComponent();
column = attributeModel.getNodeTable().getColumn(ConnectedComponents.WEAKLY);
Expand Down

0 comments on commit 95fe16d

Please sign in to comment.