aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;