diff --git a/source/MaterialXGenMdl/Nodes/ConvolutionNode.cpp b/source/MaterialXGenMdl/Nodes/ConvolutionNode.cpp index e9e97c0e23..02a8c8e0dd 100644 --- a/source/MaterialXGenMdl/Nodes/ConvolutionNode.cpp +++ b/source/MaterialXGenMdl/Nodes/ConvolutionNode.cpp @@ -86,12 +86,12 @@ const ShaderInput* ConvolutionNode::getSamplingInput(const ShaderNode& node) con if (node.hasClassification(ShaderNode::Classification::SAMPLE2D)) { const ShaderInput* input = node.getInput(SAMPLE2D_INPUT); - return input->getType() == Type::VECTOR2 ? input : nullptr; + return input && input->getType() == Type::VECTOR2 ? input : nullptr; } else if (node.hasClassification(ShaderNode::Classification::SAMPLE3D)) { const ShaderInput* input = node.getInput(SAMPLE3D_INPUT); - return input->getType() == Type::VECTOR3 ? input : nullptr; + return input && input->getType() == Type::VECTOR3 ? input : nullptr; } return nullptr; }