aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-avhpi.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/grt/grt-avhpi.adb')
-rw-r--r--src/grt/grt-avhpi.adb9
1 files changed, 8 insertions, 1 deletions
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 =>