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

This commit is contained in:
n7800 2024-07-03 05:58:07 +00:00 committed by Maxim Ganetsky
parent 5ab8254f9c
commit 6048a8cb51

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;