mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:17:18 +02:00
TAChart: Fix out-of-bounds access while drawing TColorMapSeries with empty ColorSource
git-svn-id: trunk@38982 -
This commit is contained in:
parent
8406131b04
commit
8dc70f7e1f
@ -1551,7 +1551,7 @@ var
|
|||||||
c1, c2: TColor;
|
c1, c2: TColor;
|
||||||
v1, v2: Double;
|
v1, v2: Double;
|
||||||
begin
|
begin
|
||||||
if ColorSource = nil then exit(clTAColor);
|
if (ColorSource = nil) or (ColorSource.Count = 0) then exit(clTAColor);
|
||||||
ColorSource.FindBounds(AValue, SafeInfinity, lb, ub);
|
ColorSource.FindBounds(AValue, SafeInfinity, lb, ub);
|
||||||
if Interpolate and InRange(lb, 1, ColorSource.Count - 1) then begin
|
if Interpolate and InRange(lb, 1, ColorSource.Count - 1) then begin
|
||||||
with ColorSource[lb - 1]^ do begin
|
with ColorSource[lb - 1]^ do begin
|
||||||
|
Loading…
Reference in New Issue
Block a user