Selaa lähdekoodia

Bug fix: Failure when duplicating a not-yet-connected session

(cherry picked from commit 594219ee51c86400bf827cc6842001bab474e81f)

# Conflicts:
#	source/forms/CustomScpExplorer.cpp

Source commit: 2f8b00dd46a932e2762371860c520d421fcce299
Martin Prikryl 4 vuotta sitten
vanhempi
sitoutus
6c7390cae1
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      source/forms/CustomScpExplorer.cpp

+ 4 - 1
source/forms/CustomScpExplorer.cpp

@@ -6038,7 +6038,10 @@ TSessionData * __fastcall TCustomScpExplorerForm::CloneCurrentSessionData()
   std::unique_ptr<TSessionData> SessionData(new TSessionData(L""));
   SessionData->Assign(Terminal->SessionData);
   UpdateSessionData(SessionData.get());
-  Terminal->UpdateSessionCredentials(SessionData.get());
+  if (Terminal->Active)
+  {
+    Terminal->UpdateSessionCredentials(SessionData.get());
+  }
   if (!Terminal->SessionData->HasSessionName())
   {
     // Particularly for "Workspace/XXXX" name, we need to reset it, as it would become user-visible