Fix a crash in PlaceBuilding.cs
This commit is contained in:
@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var prevItems = GetNumBuildables(self.Owner);
|
var prevItems = GetNumBuildables(self.Owner);
|
||||||
var targetActor = w.GetActorById(order.ExtraData);
|
var targetActor = w.GetActorById(order.ExtraData);
|
||||||
|
|
||||||
if (targetActor.IsDead)
|
if (targetActor == null || targetActor.IsDead)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var unit = self.World.Map.Rules.Actors[order.TargetString];
|
var unit = self.World.Map.Rules.Actors[order.TargetString];
|
||||||
|
|||||||
Reference in New Issue
Block a user