From ef5e4519b086225f4b2ae172c5b8b7d23f0ab796 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 12 Mar 2019 18:51:57 +0100 Subject: Avoid a crash in case of undefined entity (in -c). Fix #777 --- src/vhdl/configuration.adb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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); -- cgit v1.2.3