From 3ed0c4e8097493d233b44a28f10a9ba83300de46 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Wed, 27 Aug 2008 18:42:05 -0700 Subject: [PATCH] Don't crash looking for delay_type of empty task. It is legal for a task to have no definition. In that case, the delay_type calculations (used to detect infinite loops) can assume that an empty definition is a no-op and return NO_DELAY. --- netlist.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/netlist.cc b/netlist.cc index 51cf898f6..72b5b8e99 100644 --- a/netlist.cc +++ b/netlist.cc @@ -2649,6 +2649,7 @@ DelayType NetRepeat::delay_type() const DelayType NetTaskDef::delay_type() const { + if (proc_ == 0) return NO_DELAY; return proc_->delay_type(); }