From 14c8484caa358bb5e599d9485dd9d5a954f317bf Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Thu, 20 Nov 2014 11:40:18 +0100 Subject: [PATCH] Fixed null check. --- spine-csharp/src/AnimationState.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-csharp/src/AnimationState.cs b/spine-csharp/src/AnimationState.cs index 11ef183d5..3a774b330 100644 --- a/spine-csharp/src/AnimationState.cs +++ b/spine-csharp/src/AnimationState.cs @@ -191,7 +191,7 @@ namespace Spine { /// Set the current animation. Any queued animations are cleared. public TrackEntry SetAnimation (int trackIndex, Animation animation, bool loop) { - if (animationName == null) throw new ArgumentException("animation cannot be null."); + if (animation == null) throw new ArgumentException("animation cannot be null."); TrackEntry entry = new TrackEntry(); entry.animation = animation; entry.loop = loop; @@ -210,7 +210,7 @@ namespace Spine { /// Adds an animation to be played delay seconds after the current or last queued animation. /// May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. public TrackEntry AddAnimation (int trackIndex, Animation animation, bool loop, float delay) { - if (animationName == null) throw new ArgumentException("animation cannot be null."); + if (animation == null) throw new ArgumentException("animation cannot be null."); TrackEntry entry = new TrackEntry(); entry.animation = animation; entry.loop = loop;