aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-03-12 18:51:57 +0100
committerTristan Gingold <tgingold@free.fr>2019-03-14 07:14:43 +0100
commitef5e4519b086225f4b2ae172c5b8b7d23f0ab796 (patch)
treed955ad9035e2ee033a9215f9c0d54dc8382a7a9f
parent6b0ddd25c0fa4899b86d3d64d5e7bd5e7f5483f3 (diff)
downloadghdl-ef5e4519b086225f4b2ae172c5b8b7d23f0ab796.tar.gz
ghdl-ef5e4519b086225f4b2ae172c5b8b7d23f0ab796.tar.bz2
ghdl-ef5e4519b086225f4b2ae172c5b8b7d23f0ab796.zip
Avoid a crash in case of undefined entity (in -c).
Fix #777
-rw-r--r--src/vhdl/configuration.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vhdl/configuration.adb b/src/vhdl/configuration.adb
index 57b09f455..eb6db5667 100644
--- a/src/vhdl/configuration.adb
+++ b/src/vhdl/configuration.adb
@@ -301,6 +301,10 @@ package body Configuration is
when Iir_Kind_Entity_Aspect_Entity =>
-- Add the entity.
Entity_Lib := Get_Entity (Aspect);
+ if Entity_Lib = Null_Iir then
+ -- In case of error (using -c).
+ return;
+ end if;
Entity := Get_Design_Unit (Entity_Lib);
Add_Design_Unit (Entity, Aspect);