Fixed an NPE the can happen when using a builder with path markers.

This commit is contained in:
Kyprus 2012-06-29 18:20:03 -04:00
parent f135d09d03
commit e3c38609ed

View file

@ -246,9 +246,12 @@ public class EntityRobot extends Entity implements ISpawnHandler {
Action a = targets.getFirst();
BptSlotInfo target = a.slot;
laser.setPositions(new Position(posX, posY, posZ), new Position(target.x + 0.5, target.y + 0.5, target.z + 0.5));
laser.show();
if (target != null) {
laser.setPositions(new Position(posX, posY, posZ), new Position(target.x + 0.5, target.y + 0.5, target.z + 0.5));
laser.show();
}
}
else {
laser.hide();