Browse Source

Fixed null check.

NathanSweet 10 years ago
parent
commit
14c8484caa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      spine-csharp/src/AnimationState.cs

+ 2 - 2
spine-csharp/src/AnimationState.cs

@@ -191,7 +191,7 @@ namespace Spine {
 
 		/// <summary>Set the current animation. Any queued animations are cleared.</summary>
 		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 {
 		/// <summary>Adds an animation to be played delay seconds after the current or last queued animation.</summary>
 		/// <param name="delay">May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay.</param>
 		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;