diff options
author | airskywater <96818686+airskywater@users.noreply.github.com> | 2022-09-24 11:35:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-24 11:35:40 +0800 |
commit | 78f67ae5bcf62138445cf25d5f1e21dd3f7caf66 (patch) | |
tree | e4dd05ff20556b3e63b180fc95f953369aefabba | |
parent | f4e6bbd383f6c434c3285fafeb6f73d77fa4f613 (diff) | |
download | nextpnr-78f67ae5bcf62138445cf25d5f1e21dd3f7caf66.tar.gz nextpnr-78f67ae5bcf62138445cf25d5f1e21dd3f7caf66.tar.bz2 nextpnr-78f67ae5bcf62138445cf25d5f1e21dd3f7caf66.zip |
fix runtime segmentation fault
disable null pointer dereference!
-rw-r--r-- | common/kernel/timing.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/kernel/timing.cc b/common/kernel/timing.cc index df0c3b5e..66de8dfc 100644 --- a/common/kernel/timing.cc +++ b/common/kernel/timing.cc @@ -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); |