Fix null deref in findClkDelays

This was observed to cause crashes in write_timing_model.

Signed-off-by: Martin Povišer <povik@cutebit.org>
This commit is contained in:
Martin Povišer 2026-02-21 22:25:48 +01:00
parent 7adcf74a57
commit 9a14ce0870
1 changed files with 2 additions and 2 deletions

View File

@ -164,10 +164,10 @@ ClkLatency::findClkDelays(ConstClockSeq &clks,
Path *path = path_iter.next();
const ClockEdge *path_clk_edge = path->clkEdge(this);
const Scene *path_scene = path->scene(this);
const Clock *path_clk = path_clk_edge->clock();
if (path_clk_edge
&& scenes.contains(path_scene)
&& clk_set.contains(path_clk)) {
&& clk_set.contains(path_clk_edge->clock())) {
const Clock *path_clk = path_clk_edge->clock();
auto delays_itr = clk_delay_map.find(path_clk);
if (delays_itr != clk_delay_map.end()) {
ClkDelays &clk_delays = delays_itr->second;