mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 16:56:03 +02:00
TAChart: Fix occasional crash when TChartListbox is destroyed.
This commit is contained in:
parent
09cd44d467
commit
0e03eadf14
@ -313,7 +313,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TChartListbox.CreateLegendItems: TChartLegendItems;
|
function TChartListbox.CreateLegendItems: TChartLegendItems;
|
||||||
{ creates the a TLegendItems list and populates it with information for
|
{ Creates a TLegendItems list and populates it with information for
|
||||||
all series contained in the Chart. In case of MultiLegend items, only
|
all series contained in the Chart. In case of MultiLegend items, only
|
||||||
a single legend item is used }
|
a single legend item is used }
|
||||||
var
|
var
|
||||||
@ -606,6 +606,9 @@ var
|
|||||||
list: TIntegerList;
|
list: TIntegerList;
|
||||||
i, idx: Integer;
|
i, idx: Integer;
|
||||||
begin
|
begin
|
||||||
|
if (csDestroying in ComponentState) then
|
||||||
|
exit;
|
||||||
|
|
||||||
Items.BeginUpdate;
|
Items.BeginUpdate;
|
||||||
list := TIntegerList.Create;
|
list := TIntegerList.Create;
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user