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:
Adrian Siekierka 2014-12-30 08:51:44 +01:00
commit 3c1fb8514a

View file

@ -264,6 +264,8 @@ public class RobotRegistry extends WorldSavedData implements IRobotRegistry {
if (stations.containsKey(index)) {
if (station.robotTaking() != null) {
station.robotTaking().setDead();
} else if (station.robotIdTaking() != EntityRobotBase.NULL_ROBOT_ID) {
stationsTakenByRobot.get(station.robotIdTaking()).remove(index);
}
stations.remove(index);