From 593d8e0ddfa884ed9d0d0e11ab7b1eaf577da201 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 30 Jul 2018 09:45:23 +0200 Subject: common: Fix getNetinfoRouteDelay when net has no driver Signed-off-by: David Shah --- common/nextpnr.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common') diff --git a/common/nextpnr.cc b/common/nextpnr.cc index 2c50c9a1..cf1b5982 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -91,6 +91,8 @@ WireId Context::getNetinfoSinkWire(NetInfo *net_info, int user_idx) const delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const { WireId src_wire = getNetinfoSourceWire(net_info); + if (src_wire == WireId()) + return 0; WireId cursor = getNetinfoSinkWire(net_info, user_idx); delay_t delay = 0; -- cgit v1.2.3