Browse Source

* fix memleak in fpcanvas. Patch by wp, mantis #24427 attempt two

git-svn-id: trunk@24555 -
marco 12 years ago
parent
commit
80b52b2a6a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-image/src/fpcanvas.inc

+ 1 - 1
packages/fcl-image/src/fpcanvas.inc

@@ -19,7 +19,6 @@ constructor TFPCustomCanvas.Create;
 begin
   inherited create;
   FClipping := false;
-  FreeAndNil(FClipRegion);
   FRemovingHelpers := false;
   FHelpers := TList.Create;
   FDefaultFont := CreateDefaultFont;
@@ -29,6 +28,7 @@ end;
 
 destructor TFPCustomCanvas.Destroy;
 begin
+  FreeAndNil(FClipRegion);
   FRemovingHelpers := True;
   // first remove all helper references
   RemoveHelpers;