From b4565890071400397269d72c58a1ac8d42a835c3 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Mon, 29 Sep 2025 19:45:04 -0700 Subject: [PATCH] PropActivityVisitor::visit null port check PR 301 Signed-off-by: James Cherry --- power/Power.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/power/Power.cc b/power/Power.cc index 5c1ebbc0..7dd2ada0 100644 --- a/power/Power.cc +++ b/power/Power.cc @@ -490,10 +490,11 @@ PropActivityVisitor::visit(Vertex *vertex) } if (network_->isDriver(pin)) { LibertyPort *port = network_->libertyPort(pin); - LibertyCell *test_cell = port->libertyCell()->testCell(); - if (test_cell) - port = test_cell->findLibertyPort(port->name()); if (port) { + LibertyCell *test_cell = port->libertyCell()->testCell(); + if (test_cell) + port = test_cell->findLibertyPort(port->name()); + FuncExpr *func = port->function(); if (func) { PwrActivity activity = power_->evalActivity(func, inst);