From 72321eff607f6b8f187cbc5c34a08c6ce5f89a3c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 26 May 2016 07:45:49 +0200 Subject: avhpi: handle unbound component for issue 71. --- src/grt/grt-avhpi.adb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/grt/grt-avhpi.adb b/src/grt/grt-avhpi.adb index 75bc946a5..31a60e85a 100644 --- a/src/grt/grt-avhpi.adb +++ b/src/grt/grt-avhpi.adb @@ -834,7 +834,14 @@ package body Grt.Avhpi is Res := (Kind => VhpiArchBodyK, Ctxt => Null_Context); Get_Instance_Context (Ref.Inst, Ref.Ctxt, Res.Ctxt); - pragma Assert (Ref.Ctxt.Block.Kind = Ghdl_Rtik_Architecture); + if Res.Ctxt = Null_Context then + -- Component is not bound. + Res := Null_Handle; + else + pragma Assert + (Ref.Ctxt.Block.Kind = Ghdl_Rtik_Architecture); + null; + end if; Error := AvhpiErrorOk; return; when others => -- cgit v1.2.3