diff --git a/components/tachart/editors/taseriespropeditors.pas b/components/tachart/editors/taseriespropeditors.pas index 01d1896599..9b3785de22 100644 --- a/components/tachart/editors/taseriespropeditors.pas +++ b/components/tachart/editors/taseriespropeditors.pas @@ -63,8 +63,9 @@ begin s := GetComponent(0) as TCustomChartSeries; ch := s.ParentChart; AProc('-1 None'); - for i := 0 to ch.AxisList.Count - 1 do - AProc(IntToStr(i) + ' ' + ch.AxisList[i].DisplayName); + if ch <> nil then + for i := 0 to ch.AxisList.Count - 1 do + AProc(IntToStr(i) + ' ' + ch.AxisList[i].DisplayName); end; function TAxisIndexPropertyEditor.OrdValueToVisualValue( @@ -76,7 +77,7 @@ begin s := GetComponent(0) as TCustomChartSeries; ch := s.ParentChart; Result := IntToStr(AOrdValue) + ' '; - if InRange(AOrdValue, 0, ch.AxisList.Count - 1) then + if Assigned(ch) and InRange(AOrdValue, 0, ch.AxisList.Count - 1) then Result += ch.AxisList[AOrdValue].DisplayName else Result += 'None';