Browse Source

Check whether the globalsymtable is not Nil before using it! Otherwise an access violation occurs when compiling a program that contains specializations.

git-svn-id: trunk@19819 -
svenbarth 13 years ago
parent
commit
52a6699d55
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/pgenutil.pas

+ 1 - 1
compiler/pgenutil.pas

@@ -319,7 +319,7 @@ uses
             else
             else
               { the generic could have been specialized in the globalsymtable
               { the generic could have been specialized in the globalsymtable
                 already, so search there as well }
                 already, so search there as well }
-              if specializest<>current_module.globalsymtable then
+              if (specializest<>current_module.globalsymtable) and assigned(current_module.globalsymtable) then
                 begin
                 begin
                   srsym:=tsym(current_module.globalsymtable.findwithhash(hashedid));
                   srsym:=tsym(current_module.globalsymtable.findwithhash(hashedid));
                   if assigned(srsym) then
                   if assigned(srsym) then