From ca2d28ddfb6a5786bb8db90ddab28e9b7b92bc30 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Tue, 15 Jun 2021 15:01:17 +0900 Subject: [PATCH] null check --- Assets/VRM10/Editor/Components/VRM10Window.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/VRM10/Editor/Components/VRM10Window.cs b/Assets/VRM10/Editor/Components/VRM10Window.cs index c82e848ff..5bf93747b 100644 --- a/Assets/VRM10/Editor/Components/VRM10Window.cs +++ b/Assets/VRM10/Editor/Components/VRM10Window.cs @@ -64,8 +64,11 @@ namespace UniVRM10 m_so = value != null ? new SerializedObject(value) : null; m_constraints = null; - var animator = Root.GetComponent(); - m_head = animator.GetBoneTransform(HumanBodyBones.Head); + if (Root != null) + { + var animator = Root.GetComponent(); + m_head = animator.GetBoneTransform(HumanBodyBones.Head); + } } }