فهرست منبع

Bug 1749: Failure after a session lost while in Console dialog is reconnected

https://winscp.net/tracker/1749
(cherry picked from commit af4bdf134a6ff82ee126b7f5715e9a3b6e6fbae5)

Source commit: 36b034e75c855addad2449cd09f83d8f15f50e38
Martin Prikryl 6 سال پیش
والد
کامیت
a29c03f3ef
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      source/forms/Console.cpp

+ 2 - 1
source/forms/Console.cpp

@@ -178,8 +178,9 @@ bool __fastcall TConsoleDialog::Execute(const UnicodeString Command,
 //---------------------------------------------------------------------------
 void __fastcall TConsoleDialog::TerminalClose(TObject * Sender)
 {
+  // Not deassociating terminal here, leaving it to the destructor.
+  // Because at this point, we could be in the midddle of a reconnect and the event handlers can be set to TTerminalThread.
   Close();
-  Terminal = NULL;
   if (FPrevTerminalClose)
   {
     FPrevTerminalClose(Sender);