Fixes #1853 - pt. 2

This commit is contained in:
raoulvdberge
2018-07-16 12:00:22 +02:00
parent 19483d9d9a
commit b51693207d

View File

@@ -127,8 +127,10 @@ public class CraftingManager implements ICraftingManager {
boolean changed = !tasksToCancel.isEmpty() || !tasksToAdd.isEmpty();
for (UUID idToCancel : tasksToCancel) {
this.tasks.get(idToCancel).onCancelled();
this.tasks.remove(idToCancel);
if (this.tasks.containsKey(idToCancel)) {
this.tasks.get(idToCancel).onCancelled();
this.tasks.remove(idToCancel);
}
}
this.tasksToCancel.clear();