mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-07 01:09:32 +01:00
LCL: Prevent an out of bounds error in ValueListEditor when adding rows automatically in Value-column.
git-svn-id: trunk@44714 -
This commit is contained in:
parent
e64fe7ef92
commit
e7cc950b13
@ -695,11 +695,14 @@ begin
|
|||||||
if i = -1 then
|
if i = -1 then
|
||||||
raise Exception.Create('TValueListStrings.GetItemProp: Key not found: '+s);
|
raise Exception.Create('TValueListStrings.GetItemProp: Key not found: '+s);
|
||||||
end;
|
end;
|
||||||
|
if i < FItemProps.Count then
|
||||||
|
begin
|
||||||
Result := FItemProps.Items[i];
|
Result := FItemProps.Items[i];
|
||||||
if not Assigned(Result) then
|
if not Assigned(Result) then
|
||||||
Raise Exception.Create(Format('TValueListStrings.GetItemProp: Index=%d Result=Nil',[i]));
|
Raise Exception.Create(Format('TValueListStrings.GetItemProp: Index=%d Result=Nil',[i]));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TValueListEditor }
|
{ TValueListEditor }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user