Fix a crash in PlaceBuilding.cs

This commit is contained in:
abcdefg30
2017-12-22 00:46:16 +01:00
committed by Paul Chote
parent 41dd7ca428
commit 3af3299921

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits
var prevItems = GetNumBuildables(self.Owner);
var targetActor = w.GetActorById(order.ExtraData);
if (targetActor.IsDead)
if (targetActor == null || targetActor.IsDead)
return;
var unit = self.World.Map.Rules.Actors[order.TargetString];