aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/lib/rfnoc/graph.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/rfnoc/graph.cpp b/host/lib/rfnoc/graph.cpp
index 2bd47777d..d4f2d37e7 100644
--- a/host/lib/rfnoc/graph.cpp
+++ b/host/lib/rfnoc/graph.cpp
@@ -180,6 +180,10 @@ void graph_t::connect(node_ref_t src_node, node_ref_t dst_node, graph_edge_t edg
void graph_t::disconnect(node_ref_t src_node, node_ref_t dst_node, graph_edge_t edge_info)
{
// Find vertex descriptor
+ if (_node_map.count(src_node) == 0 && _node_map.count(dst_node) == 0) {
+ return;
+ }
+
auto src_vertex_desc = _node_map.at(src_node);
auto dst_vertex_desc = _node_map.at(dst_node);