mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 19:49:16 +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
|
||||
begin
|
||||
if not (FChart.Series[i] is TBasicChartSeries) then
|
||||
if not (FChart.Series[i] is TBasicPointSeries) then
|
||||
continue;
|
||||
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
|
||||
FSeries := ser;
|
||||
FXIndex := 0; // to do: fix X index
|
||||
|
Loading…
Reference in New Issue
Block a user