Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/MinimumSpanningTree/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.carlschroedl.gephi</groupId>
<artifactId>spanning-tree-plugin</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>nbm</packaging>

<name>Minimum Spanning Tree Plugin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class MinimumSpanningTree implements Statistics, LongTask {

private boolean cancel = false;
private ProgressTicket progressTicket;
private MinimumSpanningTreeAlgorithm stAlgorithm;
// Set by the thread running the statistics, and read when cancelling from another
private volatile MinimumSpanningTreeAlgorithm stAlgorithm;

private boolean directed;

Expand Down Expand Up @@ -49,7 +50,9 @@ public String getReport() { //delegate

@Override //delegate
public boolean cancel() {
return stAlgorithm.cancel();
// Can be called right as the run starts, before the algorithm exists
MinimumSpanningTreeAlgorithm algorithm = stAlgorithm;
return algorithm != null && algorithm.cancel();
}

@Override
Expand Down
Loading