diff options
Diffstat (limited to 'src/graph')
-rw-r--r-- | src/graph/Graph.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/graph/Graph.cpp b/src/graph/Graph.cpp index ed24f18943..88e2682c86 100644 --- a/src/graph/Graph.cpp +++ b/src/graph/Graph.cpp @@ -43,12 +43,15 @@ bool Graph::remove_node(NodeID nid) if(node) { - // Remove node connections + // Remove input connections for(auto &input_eid : node->_input_edges) { remove_connection(input_eid); } - for(auto &outpud_eid : node->_output_edges) + + // Remove output connections + std::set<EdgeID> output_edges_copy = node->output_edges(); + for(auto &outpud_eid : output_edges_copy) { remove_connection(outpud_eid); } |