From b87b2c010f2bb67fc4fd1082579a561130971d3f Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 29 Apr 2016 02:38:18 +0200 Subject: [PATCH] Fix potential NRE in Parachutable --- OpenRA.Mods.Common/Traits/Parachutable.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Parachutable.cs b/OpenRA.Mods.Common/Traits/Parachutable.cs index 05e29fab5b..d09224c5b5 100644 --- a/OpenRA.Mods.Common/Traits/Parachutable.cs +++ b/OpenRA.Mods.Common/Traits/Parachutable.cs @@ -16,7 +16,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("Can be paradropped by a ParaDrop actor.")] - class ParachutableInfo : ITraitInfo + class ParachutableInfo : ITraitInfo, Requires { [Desc("If we land on invalid terrain for my actor type should we be killed?")] public readonly bool KilledOnImpassableTerrain = true; @@ -51,8 +51,7 @@ namespace OpenRA.Mods.Common.Traits { self = init.Self; this.info = info; - - positionable = self.TraitOrDefault(); + positionable = self.Trait(); } void INotifyParachuteLanded.OnLanded(Actor ignore)