Browse Source

* Do not crash when module pointer is nil

(cherry picked from commit e6f71b6accd4949b8dec86fdd93d27e0c109732b)
Michael VAN CANNEYT 2 years ago
parent
commit
5adde504a9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/symtable.pas

+ 2 - 1
compiler/symtable.pas

@@ -3617,8 +3617,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));