From 754c9ad605bc94bcc377a3b1666fb7fb4bcf72c2 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 18 May 2022 14:17:35 +0200 Subject: synth-vhdl_stmts: avoid a crash after an error. Fix #2063 --- src/synth/synth-vhdl_stmts.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/synth') diff --git a/src/synth/synth-vhdl_stmts.adb b/src/synth/synth-vhdl_stmts.adb index 75080125f..8a71cc5db 100644 --- a/src/synth/synth-vhdl_stmts.adb +++ b/src/synth/synth-vhdl_stmts.adb @@ -481,7 +481,10 @@ package body Synth.Vhdl_Stmts is return; end if; - if Target.Obj.Val.Kind = Value_Wire then + if Target.Obj = No_Valtyp then + -- There was an error. + null; + elsif Target.Obj.Val.Kind = Value_Wire then W := Get_Value_Wire (Target.Obj.Val); if Is_Static (V.Val) and then V.Typ.Sz = Target.Obj.Typ.Sz -- cgit v1.2.3