Browse Source

* fixed crash for global constants after previous change

git-svn-id: branches/jvmbackend@18525 -
Jonas Maebe 14 years ago
parent
commit
f75a5895d8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/agjasmin.pas

+ 2 - 1
compiler/agjasmin.pas

@@ -929,7 +929,8 @@ implementation
              constsym:
              constsym:
                begin
                begin
                  { multiple procedures can have constants with the same name }
                  { multiple procedures can have constants with the same name }
-                 if tdef(sym.owner.defowner).typ<>procdef then
+                 if not assigned(sym.owner.defowner) or
+                    (tdef(sym.owner.defowner).typ<>procdef) then
                    WriteConstSym(tconstsym(sym));
                    WriteConstSym(tconstsym(sym));
                end;
                end;
              procsym:
              procsym: