Browse Source

* Fix access violation in case statement

git-svn-id: trunk@21939 -
michael 13 years ago
parent
commit
34c126a2d0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/fcl-passrc/src/pastree.pp

+ 3 - 0
packages/fcl-passrc/src/pastree.pp

@@ -2744,7 +2744,10 @@ procedure TPasImplCaseStatement.AddElement(Element: TPasImplElement);
 begin
   inherited AddElement(Element);
   if Body=nil then
+    begin
     Body:=Element;
+    Body.AddRef;
+    end;
 end;
 
 procedure TPasImplCaseStatement.AddExpression(const Expr: string);