浏览代码

* 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));