From f6d58fa8b75a41bf5e5637a7fcb0e5892ff503b5 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 6 Aug 2021 15:22:23 +0900 Subject: [PATCH] add null check --- Assets/VRM10.Samples/Runtime/ViewerUI.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/VRM10.Samples/Runtime/ViewerUI.cs b/Assets/VRM10.Samples/Runtime/ViewerUI.cs index 27ef876a5..7847b2df6 100644 --- a/Assets/VRM10.Samples/Runtime/ViewerUI.cs +++ b/Assets/VRM10.Samples/Runtime/ViewerUI.cs @@ -95,8 +95,10 @@ namespace UniVRM10.Samples m_textModelVersion.text = meta.Version; m_textModelAuthor.text = meta.Authors[0]; m_textModelContact.text = meta.ContactInformation; - m_textModelReference.text = meta.References[0]; - + if (meta.References != null && meta.References.Count > 0) + { + m_textModelReference.text = meta.References[0]; + } m_textPermissionAllowed.text = meta.AllowedUser.ToString(); m_textPermissionViolent.text = meta.ViolentUsage.ToString(); m_textPermissionSexual.text = meta.SexualUsage.ToString();