Browse Source

* don't crash after invalid JVM class definitions while trying to add
a default constructor

git-svn-id: branches/jvmbackend@18807 -

Jonas Maebe 14 years ago
parent
commit
3a5b3a0cce
1 changed files with 3 additions and 0 deletions
  1. 3 0
      compiler/jvm/pjvm.pas

+ 3 - 0
compiler/jvm/pjvm.pas

@@ -92,6 +92,9 @@ implementation
             if is_javaclass(obj) then
               begin
                 pd:=nil;
+                { childof may not be assigned in case of a parser error }
+                if not assigned(tobjectdef(obj).childof) then
+                  exit;
                 sym:=tsym(tobjectdef(obj).childof.symtable.find('CREATE'));
                 if assigned(sym) and
                    (sym.typ=procsym) then