aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/graph.cpp
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2020-08-27 15:44:07 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2020-08-28 12:10:35 -0500
commit03e1b13d3d84ceed82ebf7bc1cc1d27e49f07d4d (patch)
tree63e321a67d45b3536ea8ba23a49a2d23a6025a22 /host/lib/rfnoc/graph.cpp
parent49f230a8a3e4a70c69f76b1eabe71043bf8df1a6 (diff)
downloaduhd-03e1b13d3d84ceed82ebf7bc1cc1d27e49f07d4d.tar.gz
uhd-03e1b13d3d84ceed82ebf7bc1cc1d27e49f07d4d.tar.bz2
uhd-03e1b13d3d84ceed82ebf7bc1cc1d27e49f07d4d.zip
rfnoc: Exit disconnect() early if nodes not in node map
Diffstat (limited to 'host/lib/rfnoc/graph.cpp')
-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);