Skip to content

Commit ff2e0b6

Browse files
committed
[vpr][rr_graph] check for the validity of the edge before returning edge source/sin
1 parent 0cd7e0d commit ff2e0b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/librrgraph/src/base/rr_graph_storage.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,13 @@ class t_rr_graph_storage {
338338

339339
/** @brief Get the source node for the specified edge. */
340340
RRNodeId edge_src_node(const RREdgeId& edge) const {
341+
VTR_ASSERT_DEBUG(edge.is_valid());
341342
return edge_src_node_[edge];
342343
}
343344

344345
/** @brief Get the destination node for the specified edge. */
345346
RRNodeId edge_sink_node(const RREdgeId& edge) const {
347+
VTR_ASSERT_DEBUG(edge.is_valid());
346348
return edge_dest_node_[edge];
347349
}
348350

0 commit comments

Comments
 (0)