Browse Source

* deref childs of loopnodes (needed to fix mantis #11182 on 2.2.1;
that one doesn't crash 2.3.1, but this bug could still crash 2.3.1
in other cases)

git-svn-id: trunk@10893 -

Jonas Maebe 17 years ago
parent
commit
2df5878ee4
1 changed files with 10 additions and 0 deletions
  1. 10 0
      compiler/nflw.pas

+ 10 - 0
compiler/nflw.pas

@@ -63,6 +63,7 @@ interface
           function dogetcopy : tnode;override;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
+          procedure derefnode;override;
           procedure buildderefimpl;override;
           procedure derefimpl;override;
           procedure insertintolist(l : tnodelist);override;
@@ -266,6 +267,15 @@ implementation
       end;
 
 
+    procedure tloopnode.derefnode;
+      begin
+        inherited derefnode;
+        if assigned(t1) then
+          t1.derefnode;
+        if assigned(t2) then
+          t2.derefnode;
+      end;
+
     procedure tloopnode.buildderefimpl;
       begin
         inherited buildderefimpl;