Browse Source

Add check about tloadnode.symtableentry type before typecast

git-svn-id: trunk@40121 -
pierre 6 năm trước cách đây
mục cha
commit
bb219cd05a
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      compiler/ncal.pas

+ 2 - 1
compiler/ncal.pas

@@ -4594,7 +4594,8 @@ implementation
              ((tloadnode(n).symtable.symtabletype = staticsymtable) and
              ((tloadnode(n).symtable.symtabletype = staticsymtable) and
               (tloadnode(n).symtable = TSymtable(arg))) or
               (tloadnode(n).symtable = TSymtable(arg))) or
              { if the addr of the symbol is taken somewhere, it can be also non-local }
              { if the addr of the symbol is taken somewhere, it can be also non-local }
-             (tabstractvarsym(tloadnode(n).symtableentry).addr_taken)
+             ((tloadnode(n).symtableentry is tabstractvarsym) and
+	      (tabstractvarsym(tloadnode(n).symtableentry).addr_taken))
             )
             )
            ) or
            ) or
            ((n.nodetype = subscriptn) and
            ((n.nodetype = subscriptn) and