mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +02:00
TAChart: Fix TDataPointMarksClickTool crashing when series is empty.
This commit is contained in:
parent
84f716a2ff
commit
bb65b8022c
@ -2027,10 +2027,10 @@ begin
|
|||||||
|
|
||||||
for i := 0 to FChart.SeriesCount-1 do
|
for i := 0 to FChart.SeriesCount-1 do
|
||||||
begin
|
begin
|
||||||
if not (FChart.Series[i] is TBasicChartSeries) then
|
if not (FChart.Series[i] is TBasicPointSeries) then
|
||||||
continue;
|
continue;
|
||||||
ser := TBasicPointSeries(FChart.Series[i]);
|
ser := TBasicPointSeries(FChart.Series[i]);
|
||||||
if ser.Active and ser.IsPointInLabel(FChart.Drawer, APoint, FPointIndex, FYIndex) then
|
if ser.Active and (ser.Count > 0) and ser.IsPointInLabel(FChart.Drawer, APoint, FPointIndex, FYIndex) then
|
||||||
begin
|
begin
|
||||||
FSeries := ser;
|
FSeries := ser;
|
||||||
FXIndex := 0; // to do: fix X index
|
FXIndex := 0; // to do: fix X index
|
||||||
|
Loading…
Reference in New Issue
Block a user