fix a possible NRE

This commit is contained in:
Matthias Mailänder
2015-05-31 15:24:06 +02:00
parent a12e6a191b
commit aade0197ff

View File

@@ -157,6 +157,9 @@ namespace OpenRA.Traits
if (RemoveOnDeath)
self.Destroy();
if (attacker == null)
Log.Write("debug", "{0} #{1} was killed.", self.Info.Name, self.ActorID);
else
Log.Write("debug", "{0} #{1} killed by {2} #{3}", self.Info.Name, self.ActorID, attacker.Info.Name, attacker.ActorID);
}
}