read_sdf missing liberty seg fault

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2022-09-05 21:28:47 -07:00
parent bb50746f72
commit 5bfddf4518
1 changed files with 10 additions and 8 deletions

View File

@ -248,6 +248,7 @@ SdfReader::findWireEdge(Pin *from_pin,
{ {
Vertex *to_vertex, *to_vertex_bidirect_drvr; Vertex *to_vertex, *to_vertex_bidirect_drvr;
graph_->pinVertices(to_pin, to_vertex, to_vertex_bidirect_drvr); graph_->pinVertices(to_pin, to_vertex, to_vertex_bidirect_drvr);
if (to_vertex) {
// Fanin < fanout, so search for driver from load. // Fanin < fanout, so search for driver from load.
VertexInEdgeIterator edge_iter(to_vertex, graph_); VertexInEdgeIterator edge_iter(to_vertex, graph_);
while (edge_iter.hasNext()) { while (edge_iter.hasNext()) {
@ -257,6 +258,7 @@ SdfReader::findWireEdge(Pin *from_pin,
&& edge_role->sdfRole()->isWire()) && edge_role->sdfRole()->isWire())
return edge; return edge;
} }
}
return nullptr; return nullptr;
} }