From 8dc70f7e1f7e65e7c21dfeccbad2c86f0326e22d Mon Sep 17 00:00:00 2001 From: ask Date: Sun, 7 Oct 2012 13:32:02 +0000 Subject: [PATCH] TAChart: Fix out-of-bounds access while drawing TColorMapSeries with empty ColorSource git-svn-id: trunk@38982 - --- components/tachart/tafuncseries.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/tachart/tafuncseries.pas b/components/tachart/tafuncseries.pas index 530b99c567..bc7eb26188 100644 --- a/components/tachart/tafuncseries.pas +++ b/components/tachart/tafuncseries.pas @@ -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