Skip to content

Commit

Permalink
null check
Browse files Browse the repository at this point in the history
  • Loading branch information
ousttrue committed Apr 26, 2021
1 parent 74cae0e commit 6d6e812
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Assets/VRM10/Runtime/IO/Vrm10Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ public class Vrm10Importer : UniGLTF.ImporterContext
IDictionary<SubAssetKey, UnityEngine.Object> m_externalMap;

public Vrm10Importer(UniGLTF.GltfParser parser, IDictionary<SubAssetKey, UnityEngine.Object> externalObjectMap = null)
: base(parser, externalObjectMap.Select(kv => (kv.Key.Name, kv.Value)))
: base(parser, externalObjectMap?.Select(kv => (kv.Key.Name, kv.Value)))
{
m_externalMap = externalObjectMap;
if (m_externalMap == null)
{
m_externalMap = new Dictionary<SubAssetKey, UnityEngine.Object>();
}
m_model = ModelReader.Read(parser);

// for `VRMC_materials_mtoon`
Expand Down

0 comments on commit 6d6e812

Please sign in to comment.