Merge pull request #2349 from hea3ven/6.3.x
fix NPE when removing a docking station of an unloaded robot, fixes #234...
This commit is contained in:
commit
3c1fb8514a
1 changed files with 2 additions and 0 deletions
|
@ -264,6 +264,8 @@ public class RobotRegistry extends WorldSavedData implements IRobotRegistry {
|
||||||
if (stations.containsKey(index)) {
|
if (stations.containsKey(index)) {
|
||||||
if (station.robotTaking() != null) {
|
if (station.robotTaking() != null) {
|
||||||
station.robotTaking().setDead();
|
station.robotTaking().setDead();
|
||||||
|
} else if (station.robotIdTaking() != EntityRobotBase.NULL_ROBOT_ID) {
|
||||||
|
stationsTakenByRobot.get(station.robotIdTaking()).remove(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
stations.remove(index);
|
stations.remove(index);
|
||||||
|
|
Loading…
Reference in a new issue