diff --git a/src/main/java/org/jabref/logic/pdf/search/indexing/IndexingTaskManager.java b/src/main/java/org/jabref/logic/pdf/search/indexing/IndexingTaskManager.java index 701cd221644..265fa59236b 100644 --- a/src/main/java/org/jabref/logic/pdf/search/indexing/IndexingTaskManager.java +++ b/src/main/java/org/jabref/logic/pdf/search/indexing/IndexingTaskManager.java @@ -39,7 +39,7 @@ protected Void call() throws Exception { isRunning = true; } updateProgress(); - while (!taskQueue.isEmpty()) { + while (!taskQueue.isEmpty() && !isCanceled()) { taskQueue.poll().run(); numOfIndexedFiles++; updateProgress();