FIX: FTP - Access violation if you try to "Quick connect" when you are already connected (fixes #1664)

This commit is contained in:
Alexander Koblov 2024-05-21 23:06:43 +03:00
commit 84f1a960b1

View file

@ -425,9 +425,11 @@ var
Index: Integer;
Connection: TConnection;
begin
Result:= ActiveConnectionList.IndexOf(cQuickConnection) >= 0;
if not Result then
begin
Index:= ActiveConnectionList.IndexOf(cQuickConnection);
Result:= (Index >= 0);
if Result then
FtpSend:= TFTPSendEx(ActiveConnectionList.Objects[Index])
else begin
Connection := TConnection.Create;
Connection.ConnectionName:= cQuickConnection;
if ShowFtpConfDlg(Connection) then