Parcourir la source

* Do not crash when module pointer is nil

Michael VAN CANNEYT il y a 2 ans
Parent
commit
e6f71b6acc
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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));