aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-25 12:38:35 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-25 12:38:35 +0200
commit3db4d63dd47f0d7b7893316d055765c450becdf6 (patch)
tree9d48651619a44ab2bce98bde699224d958795ae9 /src
parent1aa52e7e320f15fac7f540ee0e7f92910b5ee41f (diff)
downloadghdl-3db4d63dd47f0d7b7893316d055765c450becdf6.tar.gz
ghdl-3db4d63dd47f0d7b7893316d055765c450becdf6.tar.bz2
ghdl-3db4d63dd47f0d7b7893316d055765c450becdf6.zip
Avoid a crash due to cascaded errors.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/sem.adb b/src/vhdl/sem.adb
index a886e8431..08c3a7a8b 100644
--- a/src/vhdl/sem.adb
+++ b/src/vhdl/sem.adb
@@ -2604,7 +2604,9 @@ package body Sem is
Pkg : constant Iir :=
Get_Named_Entity (Get_Uninstantiated_Package_Name (El));
begin
- if Get_Need_Body (Pkg) then
+ if not Is_Error (Pkg)
+ and then Get_Need_Body (Pkg)
+ then
return True;
end if;
end;