Browse Source

* Avoid access violation. Use internal error instead

Michaël Van Canneyt 3 tháng trước cách đây
mục cha
commit
bbecb015c9
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  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);