From 7c2e2cb7efef43d9ffda092b7b054c13ed9a1cc5 Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Mon, 30 Mar 2020 17:45:27 +0200 Subject: [PATCH] [unity] Fixed a potential null reference exception reported by a user. --- .../Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs index ce177e0d7..69679ff9b 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Components/SkeletonAnimation.cs @@ -182,7 +182,7 @@ namespace Spine.Unity { /// 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. public void Update (float deltaTime) { - if (!valid) + if (!valid || state == null) return; deltaTime *= timeScale;