mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 04:29:25 +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;
|
||||
|
||||
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
|
||||
a single legend item is used }
|
||||
var
|
||||
@ -606,6 +606,9 @@ var
|
||||
list: TIntegerList;
|
||||
i, idx: Integer;
|
||||
begin
|
||||
if (csDestroying in ComponentState) then
|
||||
exit;
|
||||
|
||||
Items.BeginUpdate;
|
||||
list := TIntegerList.Create;
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user