mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:39:20 +02:00
TAChart: Fix crash in stacked bar series due to dd3322cfc0
This commit is contained in:
parent
68acca089e
commit
ebd45b7c62
@ -1429,10 +1429,14 @@ begin
|
|||||||
FCumulativeExtentIsValid := false;
|
FCumulativeExtentIsValid := false;
|
||||||
FXListExtentIsValid := false;
|
FXListExtentIsValid := false;
|
||||||
FYListExtentIsValid := false;
|
FYListExtentIsValid := false;
|
||||||
SetLength(FYRangeValid, YCount);
|
if YCount <> MaxInt then
|
||||||
SetLength(FYRange, YCount);
|
begin
|
||||||
for i := 0 to High(FYRange) do
|
SetLength(FYRangeValid, YCount);
|
||||||
FYRangeValid[i] := false;
|
SetLength(FYRange, YCount);
|
||||||
|
for i := 0 to High(FYRange) do
|
||||||
|
FYRangeValid[i] := false;
|
||||||
|
end else
|
||||||
|
SetLength(FYRangeValid, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomChartSource.IsErrorBarDataStored(AIndex: Integer): Boolean;
|
function TCustomChartSource.IsErrorBarDataStored(AIndex: Integer): Boolean;
|
||||||
@ -1699,7 +1703,7 @@ procedure TCustomChartSource.YRange(AYIndex: Integer; var AMin, AMax: Double);
|
|||||||
var
|
var
|
||||||
i, yIdx: Integer;
|
i, yIdx: Integer;
|
||||||
begin
|
begin
|
||||||
if FYRangeValid[AYIndex] then
|
if (AYIndex < Length(FYRangeValid)) and FYRangeValid[AYIndex] then
|
||||||
begin
|
begin
|
||||||
AMin := FYRange[AYIndex].FStart;
|
AMin := FYRange[AYIndex].FStart;
|
||||||
AMax := FYRange[AYIndex].FEnd;
|
AMax := FYRange[AYIndex].FEnd;
|
||||||
|
Loading…
Reference in New Issue
Block a user