fix runtime segmentation fault

disable null pointer dereference!
This commit is contained in:
airskywater 2022-09-24 11:35:40 +08:00 committed by GitHub
parent f4e6bbd383
commit 78f67ae5bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,6 +300,8 @@ void TimingAnalyser::identify_related_domains()
[&](const NetInfo *ni, dict<IdString, delay_t> &drivers, delay_t delay_acc) {
// Get driving cell and port
const CellInfo *cell = ni->driver.cell;
if (nullptr == cell) return;
const IdString port = ni->driver.port;
bool didGoUpstream = false;
@ -360,6 +362,9 @@ void TimingAnalyser::identify_related_domains()
for (const auto &domain : domains) {
const NetInfo *ni = ctx->nets.at(domain.key.clock).get();
if (nullptr == ni) continue;
if (nullptr == ni->driver.cell) continue;
dict<IdString, delay_t> drivers;
find_net_drivers(ni, drivers, 0);