Fix potential crash in material generator

This commit is contained in:
Wojtek Figat
2022-01-26 21:18:34 +01:00
parent 05b80d17c5
commit 500f76cb03

View File

@@ -535,7 +535,7 @@ void MaterialGenerator::ProcessGroupFunction(Box* box, Node* node, Value& value)
break;
}
Box* functionCallBox = functionCallNode->TryGetBox(inputIndex);
if (functionCallBox->HasConnection())
if (functionCallBox && functionCallBox->HasConnection())
{
// Use provided input value from the function call
_graphStack.Pop();