Fix crash in PropActivityVisitor::visit when accessing null LibertyPort

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
This commit is contained in:
Matt Liberty 2025-09-23 21:13:14 +00:00
parent 2debe54ede
commit f4cb6e7354
1 changed files with 5 additions and 3 deletions

View File

@ -490,9 +490,11 @@ PropActivityVisitor::visit(Vertex *vertex)
} }
if (network_->isDriver(pin)) { if (network_->isDriver(pin)) {
LibertyPort *port = network_->libertyPort(pin); LibertyPort *port = network_->libertyPort(pin);
LibertyCell *test_cell = port->libertyCell()->testCell(); if (port) {
if (test_cell) LibertyCell *test_cell = port->libertyCell()->testCell();
port = test_cell->findLibertyPort(port->name()); if (test_cell)
port = test_cell->findLibertyPort(port->name());
}
if (port) { if (port) {
FuncExpr *func = port->function(); FuncExpr *func = port->function();
if (func) { if (func) {