mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:56:01 +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;
|
||||
v1, v2: Double;
|
||||
begin
|
||||
if ColorSource = nil then exit(clTAColor);
|
||||
if (ColorSource = nil) or (ColorSource.Count = 0) then exit(clTAColor);
|
||||
ColorSource.FindBounds(AValue, SafeInfinity, lb, ub);
|
||||
if Interpolate and InRange(lb, 1, ColorSource.Count - 1) then begin
|
||||
with ColorSource[lb - 1]^ do begin
|
||||
|
Loading…
Reference in New Issue
Block a user