diff --git a/lib/mayaUsd/render/MaterialXGenOgsXml/ShaderGenUtil.cpp b/lib/mayaUsd/render/MaterialXGenOgsXml/ShaderGenUtil.cpp
index 2c869405bb..19ea174fec 100644
--- a/lib/mayaUsd/render/MaterialXGenOgsXml/ShaderGenUtil.cpp
+++ b/lib/mayaUsd/render/MaterialXGenOgsXml/ShaderGenUtil.cpp
@@ -386,9 +386,9 @@ void TopoNeutralGraph::cloneNodeGraphConnection(
++_outputIndex;
_outputMap.insert({ outputKey, graphOutput });
graphOutput->setConnectedNode(destConnectedNode);
- auto destInput = destNode.addInput(sourceInput.getName(), sourceInput.getType());
- destInput->setConnectedOutput(graphOutput);
}
+ auto destInput = destNode.addInput(sourceInput.getName(), sourceInput.getType());
+ destInput->setConnectedOutput(graphOutput);
}
} // namespace ShaderGenUtil
diff --git a/test/lib/mayaUsd/utils/materialx_test_data/MultiConnect1_topo.mtlx b/test/lib/mayaUsd/utils/materialx_test_data/MultiConnect1_topo.mtlx
new file mode 100644
index 0000000000..20f530c87f
--- /dev/null
+++ b/test/lib/mayaUsd/utils/materialx_test_data/MultiConnect1_topo.mtlx
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/lib/mayaUsd/utils/materialx_test_data/topology_tests.mtlx b/test/lib/mayaUsd/utils/materialx_test_data/topology_tests.mtlx
index f27e817b79..3f20ef6652 100644
--- a/test/lib/mayaUsd/utils/materialx_test_data/topology_tests.mtlx
+++ b/test/lib/mayaUsd/utils/materialx_test_data/topology_tests.mtlx
@@ -158,4 +158,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+