From 99605e5b867572c25ad375b79c8c822ea82a18ed Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 29 Nov 2017 06:20:05 +0100 Subject: Avoid a crash in case of error. Fix #472 --- src/vhdl/sem_expr.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vhdl') diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index 5ae8653c3..56ea69f66 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -4487,7 +4487,7 @@ package body Sem_Expr is Expr_Type := Get_Type (Expr); pragma Assert (Expr_Type /= Null_Iir); Result_Type := Compatible_Types_Intersect (Atype, Expr_Type); - if Is_Overload_List (Atype) then + if Atype /= Null_Iir and then Is_Overload_List (Atype) then Free_Overload_List (Atype); end if; if Result_Type /= Null_Iir then -- cgit v1.2.3