From bbecb015c9c841c77d38d8499d26f4fa6a2a27b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Sat, 12 Apr 2025 10:48:59 +0200 Subject: [PATCH] * Avoid access violation. Use internal error instead --- compiler/ptype.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/ptype.pas b/compiler/ptype.pas index 08eb332e03..f7bf7ecd28 100644 --- a/compiler/ptype.pas +++ b/compiler/ptype.pas @@ -1840,8 +1840,9 @@ implementation and get the member owner instead of just created enumdef } if not assigned(aktenumdef) then begin - searchsym(pattern,sym,st); - if sym.typ=enumsym then + if not searchsym(pattern,sym,st) then + internalerror(202504121) + else if sym.typ=enumsym then aktenumdef:=tenumsym(sym).definition else internalerror(201101021);