mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 03:59:56 +02:00
TAChart: Fix SIGFPE in TChartSeries.Add when the last data item is NaN
git-svn-id: trunk@39861 -
This commit is contained in:
parent
a589532b57
commit
f0478fa8a2
@ -154,7 +154,7 @@ type
|
||||
function GetGraphPointX(AIndex: Integer): Double; inline;
|
||||
function GetGraphPointY(AIndex: Integer): Double; inline;
|
||||
function GetSeriesColor: TColor; virtual;
|
||||
function GetXMaxVal: Integer;
|
||||
function GetXMaxVal: Double;
|
||||
procedure SourceChanged(ASender: TObject); virtual;
|
||||
procedure VisitSources(
|
||||
AVisitor: TChartOnSourceVisitor; AAxis: TChartAxis; var AData); override;
|
||||
@ -762,10 +762,10 @@ begin
|
||||
Result := Extent.b.X;
|
||||
end;
|
||||
|
||||
function TChartSeries.GetXMaxVal: Integer;
|
||||
function TChartSeries.GetXMaxVal: Double;
|
||||
begin
|
||||
if Count > 0 then
|
||||
Result := Round(Source[Count - 1]^.X)
|
||||
Result := Source[Count - 1]^.X
|
||||
else
|
||||
Result := 0;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user