Forráskód Böngészése

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

https://winscp.net/tracker/1710

Source commit: 1b0328662526548499b947e0733aa52de498b207
Martin Prikryl 6 éve
szülő
commit
fae85118f3
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      source/windows/TerminalManager.cpp

+ 5 - 1
source/windows/TerminalManager.cpp

@@ -279,7 +279,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.