Fix a crash when using the chronoshift power

if the "chronosphere-actor" doesn't have an "active" sequence
This commit is contained in:
abcdefg30
2015-11-15 22:21:23 +01:00
parent 7d2c86d75b
commit 828cb5cf38

View File

@@ -93,7 +93,7 @@ namespace OpenRA.Mods.RA.Activities
if (teleporter != null && self != teleporter && !teleporter.Disposed)
{
var building = teleporter.TraitOrDefault<WithSpriteBody>();
if (building != null)
if (building != null && building.DefaultAnimation.HasSequence("active"))
building.PlayCustomAnimation(teleporter, "active");
}