mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 04:58:11 +02:00
TAChart: Fix crash in design mode when Undo is executed after deleting a series.
This commit is contained in:
parent
73d41e6636
commit
358a6955a0
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user