Merge pull request #5801 from Mailaender/building-influence-crash

Fixed a crash when trying to capture husks that have been destroyed.
This commit is contained in:
Paul Chote
2014-07-05 11:36:54 +12:00
4 changed files with 11 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA.Buildings
{
[Desc("A dictionary of buildings placed on the map. Attach this to the world actor.")]
public class BuildingInfluenceInfo : ITraitInfo
{
public object Create(ActorInitializer init) { return new BuildingInfluence(init.world); }
@@ -28,7 +29,7 @@ namespace OpenRA.Mods.RA.Buildings
influence = new CellLayer<Actor>(map);
world.ActorAdded += a =>
world.ActorAdded += a =>
{
var b = a.TraitOrDefault<Building>();
if (b == null)