From 03e1b13d3d84ceed82ebf7bc1cc1d27e49f07d4d Mon Sep 17 00:00:00 2001 From: Aaron Rossetto Date: Thu, 27 Aug 2020 15:44:07 -0500 Subject: rfnoc: Exit disconnect() early if nodes not in node map --- host/lib/rfnoc/graph.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host/lib/rfnoc/graph.cpp') 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); -- cgit v1.2.3