From 4956f8383e80cfbe29e9d06d5cdbf19d773a89e0 Mon Sep 17 00:00:00 2001 From: maxim Date: Fri, 15 May 2015 21:55:59 +0000 Subject: [PATCH] Merged revision(s) 49019-49020 #fd258ffc81-#fd258ffc81 from trunk: TAChart: Fix crash of IDE if TPieSeries is linked to a TUserDefinedChartSource ........ TAChart: Fix crash of IDE if TFitSeries is linked to a TUserDefinedChartSource ........ git-svn-id: branches/fixes_1_4@49037 - --- components/tachart/tafuncseries.pas | 1 + components/tachart/taradialseries.pas | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/tachart/tafuncseries.pas b/components/tachart/tafuncseries.pas index ff5c3c1419..b282a1fd43 100644 --- a/components/tachart/tafuncseries.pas +++ b/components/tachart/tafuncseries.pas @@ -1414,6 +1414,7 @@ var ns := Source.Count; if (np <= 0) or (ns = 0) or (ns < np) then exit; CalcXRange(xmin, xmax); + if xmin = xmax then exit; n := 0; for i := 0 to ns - 1 do diff --git a/components/tachart/taradialseries.pas b/components/tachart/taradialseries.pas index c40957f7f1..3cf2adb6df 100644 --- a/components/tachart/taradialseries.pas +++ b/components/tachart/taradialseries.pas @@ -499,6 +499,8 @@ begin // This is a workaround for db source invalidating the cache due to // unnecessary "dataset changed" events. total := Source.ValuesTotal; + if total = 0 then + exit; for i := 0 to Count - 1 do begin di := Source[i]; if IsNan(di^.Y) then continue;