null check

This commit is contained in:
Masataka SUMI
2024-08-03 02:06:51 +09:00
parent 7a801071bd
commit d17f03c45d
3 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ namespace UniGLTF
{
if (src == null) throw new ArgumentNullException(nameof(src));
if (textureExporter == null) throw new ArgumentNullException(nameof(textureExporter));
if (src.shader != Shader) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
if (src.shader != Shader || Shader == null) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
dst = new glTFMaterial
{

View File

@@ -24,7 +24,7 @@ namespace UniGLTF
{
if (src == null) throw new ArgumentNullException(nameof(src));
if (textureExporter == null) throw new ArgumentNullException(nameof(textureExporter));
if (src.shader != Shader) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
if (src.shader != Shader || Shader == null) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
dst = glTF_KHR_materials_unlit.CreateDefault();
dst.name = src.name;

View File

@@ -23,7 +23,7 @@ namespace UniGLTF
{
if (src == null) throw new ArgumentNullException(nameof(src));
if (textureExporter == null) throw new ArgumentNullException(nameof(textureExporter));
if (src.shader != Shader) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
if (src.shader != Shader || Shader == null) throw new UniGLTFShaderNotMatchedInternalException(src.shader);
dst = glTF_KHR_materials_unlit.CreateDefault();
dst.name = src.name;