diff --git a/source/MaterialXGraphEditor/Graph.cpp b/source/MaterialXGraphEditor/Graph.cpp index 98c61a7857..2509e50807 100644 --- a/source/MaterialXGraphEditor/Graph.cpp +++ b/source/MaterialXGraphEditor/Graph.cpp @@ -2853,6 +2853,8 @@ void Graph::initializeGraph() _state.graphElem = _graphDoc; _state.isCompoundNodeGraph = false; _prevUiNode = nullptr; + _currUiNode = nullptr; + _currRenderNode = nullptr; // Set the display name from the current material filename. mx::FilePath materialPath(_materialFilename);