diff --git a/components/tachart/tadrawerwmf.pas b/components/tachart/tadrawerwmf.pas index 530d6a9f13..d42bfcc843 100644 --- a/components/tachart/tadrawerwmf.pas +++ b/components/tachart/tadrawerwmf.pas @@ -119,6 +119,9 @@ end; procedure TWindowsMetafileDrawer.DrawingBegin(const ABoundingBox: TRect); begin inherited DrawingBegin(ABoundingBox); + FreeAndNil(FCanvas); + FMetafile.Width := ABoundingBox.Right - ABoundingBox.Left; + FMetafile.Height := ABoundingBox.Bottom - ABoundingBox.Top; if FCanvas = nil then FCanvas := TMetafileCanvas.Create(FMetafile, 0); end;