소스 검색

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

Harald Csaszar 5 년 전
부모
커밋
7c2e2cb7ef
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs

+ 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;