Browse Source

* Avoid access violation. Use internal error instead

Michaël Van Canneyt 3 months ago
parent
commit
bbecb015c9
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/ptype.pas

+ 3 - 2
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);