فهرست منبع

Bug 1710 – Failure when canceling connection attempt started from command-line

https://winscp.net/tracker/1710
(cherry picked from commit fae85118f368a7e62d6cc9d30b7f24d2a6165ee8)

# Conflicts:
#	source/windows/TerminalManager.cpp

Source commit: bfe1d579a2297cecaeddcb332edf7997a5c13569
Martin Prikryl 6 سال پیش
والد
کامیت
cc7a902069
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      source/windows/TerminalManager.cpp

+ 5 - 1
source/windows/TerminalManager.cpp

@@ -273,7 +273,11 @@ void __fastcall TTerminalManager::DoConnectTerminal(TTerminal * Terminal, bool R
         Items[ActiveTerminalIndex] = Terminal;
         OwnsObjects = true;
         FActiveTerminal = Terminal;
-        FScpExplorer->ReplaceTerminal(Terminal);
+        // Can be NULL, when opening the first session from command-line
+        if (FScpExplorer != NULL)
+        {
+          FScpExplorer->ReplaceTerminal(Terminal);
+        }
         // Now we do not have any reference to an abandoned terminal, so we can safely allow the thread
         // to complete its task and destroy the terminal afterwards.
         TerminalThread->Terminate();