From bce550029033b7bd8f51d4a4be4d4774b9d817dd Mon Sep 17 00:00:00 2001 From: Harald Csaszar Date: Thu, 11 Feb 2021 20:26:25 +0100 Subject: [PATCH] [unity] SkeletonAnimation inspector exception bugfix. Occurred when switching assigned SkeletonDataAsset from an invalid to a valid one. --- .../spine-unity/Editor/Components/SkeletonAnimationInspector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs index 75f3e2966..c33232442 100644 --- a/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs +++ b/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Components/SkeletonAnimationInspector.cs @@ -90,7 +90,7 @@ namespace Spine.Unity.Editor { protected void TrySetAnimation (SkeletonAnimation skeletonAnimation) { if (skeletonAnimation == null) return; - if (!skeletonAnimation.valid) + if (!skeletonAnimation.valid || skeletonAnimation.AnimationState == null) return; TrackEntry current = skeletonAnimation.AnimationState.GetCurrent(0);