From 33c910ddd3cb99bab974184343b37d90034140a6 Mon Sep 17 00:00:00 2001 From: John Tramm Date: Wed, 14 Feb 2024 23:19:10 -0600 Subject: [PATCH] Fix issue with Cell::get_contained_cells() utility function (#2873) --- src/cell.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cell.cpp b/src/cell.cpp index 00083d967b..a46f05687e 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -1272,6 +1272,9 @@ struct ParentCellStack { //! compute an instance for the provided distribcell index int32_t compute_instance(int32_t distribcell_index) const { + if (distribcell_index == C_NONE) + return 0; + int32_t instance = 0; for (const auto& parent_cell : this->parent_cells_) { auto& cell = model::cells[parent_cell.cell_index];