aboutsummaryrefslogtreecommitdiffstats
path: root/src/errorout.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-06 16:21:47 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-06 16:21:47 +0200
commit173bc379a93dd7de950557782bcc9f2b0a137ca9 (patch)
treed77225778265b1019d7314676c9dc65e21943894 /src/errorout.adb
parent4073a0be10c0cf14c87f3f19fc3baf594148149c (diff)
downloadghdl-173bc379a93dd7de950557782bcc9f2b0a137ca9.tar.gz
ghdl-173bc379a93dd7de950557782bcc9f2b0a137ca9.tar.bz2
ghdl-173bc379a93dd7de950557782bcc9f2b0a137ca9.zip
ghdlsynth: fix crash when using libghdl.
Diffstat (limited to 'src/errorout.adb')
-rw-r--r--src/errorout.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/errorout.adb b/src/errorout.adb
index d3eea84c3..ab05c956a 100644
--- a/src/errorout.adb
+++ b/src/errorout.adb
@@ -229,7 +229,9 @@ package body Errorout is
procedure Register_Earg_Handler
(Kind : Earg_Kind; Handler : Earg_Handler) is
begin
- if Lang_Handlers (Kind) /= null then
+ if Lang_Handlers (Kind) /= null
+ and then Lang_Handlers (Kind) /= Handler
+ then
-- Cannot change handler.
raise Internal_Error;
end if;