Should fix all NPEs encountered because of nonexistant task maps (#1667)

This commit is contained in:
Tobias 2019-11-05 03:20:54 +01:00 committed by Nick Ignoffo
parent e56c0cdbb9
commit 5f31f8c69a

View file

@ -250,9 +250,11 @@ public class GenericHandler {
targetTaskMap.remove(animal);
attackTaskMap.remove(animal);
}
} else if (targetTaskMap.containsKey(animal)) {
targetTaskMap.remove(animal);
attackTaskMap.remove(animal);
} else {
if (targetTaskMap != null)
targetTaskMap.remove(animal);
if (attackTaskMap != null)
attackTaskMap.remove(animal);
}
}
}