destroying buildings no longer crashes the game

This commit is contained in:
Chris Forbes
2009-12-19 23:48:31 +13:00
parent 8c2194c903
commit 301873f88e

View File

@@ -57,8 +57,9 @@ namespace OpenRa.Game
public void Remove( Actor self, IOccupySpace unit )
{
foreach (var c in unit.OccupiedCells())
influence[c.X, c.Y] = null;
if (unit != null)
foreach (var c in unit.OccupiedCells())
influence[c.X, c.Y] = null;
}
public void Update(Actor self, IOccupySpace unit)