TAChart: Fix SIGFPE on TListChartSource.SetXValue(NaN) and SetYValue(NaN)

git-svn-id: trunk@38812 -
This commit is contained in:
ask 2012-09-24 14:39:32 +00:00
parent 4b2fe13853
commit ea61e7b307

View File

@ -578,7 +578,7 @@ var
begin begin
oldX := Item[AIndex]^.X; oldX := Item[AIndex]^.X;
Result := AIndex; Result := AIndex;
if oldX = AValue then exit; if IsEquivalent(oldX, AValue) then exit;
Item[AIndex]^.X := AValue; Item[AIndex]^.X := AValue;
UpdateExtent; UpdateExtent;
if Sorted then begin if Sorted then begin
@ -650,7 +650,7 @@ var
begin begin
oldY := Item[AIndex]^.Y; oldY := Item[AIndex]^.Y;
if oldY = AValue then exit; if IsEquivalent(oldY, AValue) then exit;
Item[AIndex]^.Y := AValue; Item[AIndex]^.Y := AValue;
if FValuesTotalIsValid then if FValuesTotalIsValid then
FValuesTotal += NumberOr(AValue) - NumberOr(oldY); FValuesTotal += NumberOr(AValue) - NumberOr(oldY);