mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 14:19:26 +02:00
TAChart: Fix compilation with FPC 2.5.1. Issue #18695
git-svn-id: trunk@29385 -
This commit is contained in:
parent
4f8d7a9757
commit
4f3c1f45bb
@ -402,14 +402,15 @@ end;
|
|||||||
function TChart.Clone: TChart;
|
function TChart.Clone: TChart;
|
||||||
var
|
var
|
||||||
ms: TMemoryStream;
|
ms: TMemoryStream;
|
||||||
|
cloned: TComponent = nil;
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
|
||||||
ms := TMemoryStream.Create;
|
ms := TMemoryStream.Create;
|
||||||
try
|
try
|
||||||
WriteComponentToStream(ms, Self);
|
WriteComponentToStream(ms, Self);
|
||||||
ms.Seek(0, soBeginning);
|
ms.Seek(0, soBeginning);
|
||||||
ReadComponentFromBinaryStream(
|
ReadComponentFromBinaryStream(
|
||||||
ms, Result, @FindComponentClass, Owner, Parent, Owner);
|
ms, cloned, @FindComponentClass, Owner, Parent, Owner);
|
||||||
|
Result := cloned as TChart;
|
||||||
finally
|
finally
|
||||||
ms.Free;
|
ms.Free;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user