Commit 081a72e1 authored by Jan Kožusznik's avatar Jan Kožusznik

fix: issue with null pointer during setAll

setAll is called on separate thread
parent edf1a32f
......@@ -3,9 +3,11 @@ package cz.it4i.fiji.haas_spim_benchmark.core;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import cz.it4i.fiji.haas.ui.JavaFXRoutines;
import cz.it4i.fiji.haas_spim_benchmark.core.BenchmarkJobManager.BenchmarkJob;
class TaskObservableValueRegistry implements Closeable {
......@@ -39,7 +41,8 @@ class TaskObservableValueRegistry implements Closeable {
public void run() {
List<Task> tasks = job.getTasks();
JavaFXRoutines.runOnFxThread(() -> observableTaskList.setAll(tasks));
synchronized(TaskObservableValueRegistry.this) {
if (timer != null) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment