Merge pull request #8833 from obrakmann/fix8826_trait-from-dead-crate-crash

Fix crates dying while not in the world
This commit is contained in:
Matthias Mailänder
2015-07-29 15:30:07 +02:00

View File

@@ -117,7 +117,7 @@ namespace OpenRA.Mods.Common.Traits
public void Tick(Actor self)
{
if (info.Lifetime != 0 && ++ticks >= info.Lifetime * 25)
if (info.Lifetime != 0 && self.IsInWorld && ++ticks >= info.Lifetime * 25)
self.Dispose();
}