Should fix all NPEs encountered because of nonexistant task maps (#1667)
This commit is contained in:
parent
e56c0cdbb9
commit
5f31f8c69a
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue