Explorar o código

* Fix access violation in case statement

git-svn-id: trunk@21939 -
michael %!s(int64=13) %!d(string=hai) anos
pai
achega
34c126a2d0
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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);