Merge branch 'exttool-rangecheck' into 'main'

IDE: Fixed out-of-bounds error when calling a non-existent "external tool" with a shortcut

See merge request freepascal.org/lazarus/lazarus!301
This commit is contained in:
Maxim Ganetsky 2024-07-03 12:56:03 +00:00
commit ea8dad6089

View File

@ -547,8 +547,10 @@ var
Tool: TIDEExternalToolOptions;
begin
Result:=mrCancel;
Item:=Items[Index];
if (Index < 0) or (Index >= fItems.Count) then
exit;
Item:=Items[Index];
Tool:=TIDEExternalToolOptions.Create;
try
Tool.Title:=Item.Title;