fix dumb crash with heli docking with FIX

This commit is contained in:
Chris Forbes
2010-01-02 21:06:59 +13:00
parent 6b1857e0b6
commit a1528c6484
2 changed files with 2 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ namespace OpenRa.Game.Traits
reservation = res.Reserve(self);
var offset = (order.TargetActor.Info as BuildingInfo).SpawnOffset;
var offsetVec = new float2(offset[0], offset[1]);
var offsetVec = offset != null ? new float2(offset[0], offset[1]) : float2.Zero;
self.CancelActivity();
self.QueueActivity(new HeliFly(order.TargetActor.CenterLocation + offsetVec));