소스 검색

* Do not crash when module pointer is nil

Michael VAN CANNEYT 2 년 전
부모
커밋
e6f71b6acc
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      compiler/symtable.pas

+ 2 - 1
compiler/symtable.pas

@@ -3623,8 +3623,9 @@ implementation
       var
         pmod : tmodule;
       begin
-        pmod:=tmodule(pm);
         result:=false;
+        if not assigned(pm) then exit;
+        pmod:=tmodule(pm);
         if assigned(pmod.globalsymtable) then
           begin
             srsym:=tsym(pmod.globalsymtable.Find(s));