From c67275007852f5b3a4d743f6301ff07da28adeae Mon Sep 17 00:00:00 2001 From: ousttrue Date: Fri, 7 Jun 2024 16:20:28 +0900 Subject: [PATCH] skip null --- Assets/VRM10/Runtime/IO/Model/ModelExporter.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Assets/VRM10/Runtime/IO/Model/ModelExporter.cs b/Assets/VRM10/Runtime/IO/Model/ModelExporter.cs index dd9e3d044..b7f3302e9 100644 --- a/Assets/VRM10/Runtime/IO/Model/ModelExporter.cs +++ b/Assets/VRM10/Runtime/IO/Model/ModelExporter.cs @@ -112,6 +112,10 @@ namespace UniVRM10 var materials = renderer.sharedMaterials; // avoid copy foreach (var material in materials) { + if (material == null) + { + continue; + } if (Materials.Contains(material)) { continue;