From 2e46b80a4a4d6fb21dc1a872c28b39cdbe322864 Mon Sep 17 00:00:00 2001 From: G21 Date: Sat, 7 Apr 2018 17:30:07 +0900 Subject: [PATCH] check index range --- Scripts/Format/VRMImporterContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Format/VRMImporterContext.cs b/Scripts/Format/VRMImporterContext.cs index aad6ef1b7..3de95b0b0 100644 --- a/Scripts/Format/VRMImporterContext.cs +++ b/Scripts/Format/VRMImporterContext.cs @@ -45,7 +45,7 @@ namespace VRM meta.ContactInformation = gltfMeta.contactInformation; meta.Reference = gltfMeta.reference; meta.Title = gltfMeta.title; - if (gltfMeta.texture != -1) + if (gltfMeta.texture >=0 && gltfMeta.texture< Textures.Count) { meta.Thumbnail = Textures[gltfMeta.texture].Texture; }