Ver código fonte

[unity] Fixed a potential null reference exception reported by a user.

Harald Csaszar 5 anos atrás
pai
commit
7c2e2cb7ef

+ 1 - 1
spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs

@@ -182,7 +182,7 @@ namespace Spine.Unity {
 
 		/// <summary>Progresses the AnimationState according to the given deltaTime, and applies it to the Skeleton. Use Time.deltaTime to update manually. Use deltaTime 0 to update without progressing the time.</summary>
 		public void Update (float deltaTime) {
-			if (!valid)
+			if (!valid || state == null)
 				return;
 
 			deltaTime *= timeScale;