diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-10-11 18:42:53 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-10-13 18:54:22 +0200 |
commit | f7300b2906b6c918c83b6037d7223e7409dd440e (patch) | |
tree | df9f4979f3eab24936fa05322598722e363334a4 /src | |
parent | 81fd63ab8cb8e3ddb0ff93fb5f8551834da1a210 (diff) | |
download | ghdl-f7300b2906b6c918c83b6037d7223e7409dd440e.tar.gz ghdl-f7300b2906b6c918c83b6037d7223e7409dd440e.tar.bz2 ghdl-f7300b2906b6c918c83b6037d7223e7409dd440e.zip |
netlists-iterators: avoid a crash if no ports.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/netlists-iterators.adb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/synth/netlists-iterators.adb b/src/synth/netlists-iterators.adb index 2bb1c8c05..4468a889e 100644 --- a/src/synth/netlists-iterators.adb +++ b/src/synth/netlists-iterators.adb @@ -316,9 +316,7 @@ package body Netlists.Iterators is Inst := Get_Next_Instance (Inst); exit when Inst = No_Instance; Num := Get_Nbr_Outputs (Inst); - if Num = 0 then - pragma Assert (Get_Id (Get_Module (Inst)) = Id_Free); - else + if Num /= 0 then return Nets_Cursor'(Inst => Inst, N => Get_First_Output (Inst), Num => Num); |