Преглед на файлове

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

https://winscp.net/tracker/1749

Source commit: 883587a7ba23675e163737a51c08f35d14a2e36c
Martin Prikryl преди 6 години
родител
ревизия
af4bdf134a
променени са 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);