Quellcode durchsuchen

Bug fix: Failure when starting any (local) batch file operation with no session opened

Caused by 4df7eca506

(cherry picked from commit a7d36b2c440ecac8f3922458f53518842d0b5d46)

Source commit: f4339136a2cc09fbe0af670bc300f70aac973682
Martin Prikryl vor 6 Jahren
Ursprung
Commit
67eac2d74d
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. 3 2
      source/forms/CustomScpExplorer.cpp

+ 3 - 2
source/forms/CustomScpExplorer.cpp

@@ -1403,12 +1403,13 @@ UnicodeString __fastcall TCustomScpExplorerForm::GetToolbarsButtonsStr()
 void __fastcall TCustomScpExplorerForm::CreateProgressForm(TSynchronizeProgress * SynchronizeProgress)
 {
   DebugAssert(FProgressForm == NULL);
-  FProgressForm =
-    new TProgressForm(Application, (FTransferResumeList != NULL), Terminal->IsCapable[fsSkipTransfer], SynchronizeProgress);
+  bool AllowSkip = (Terminal != NULL) ? Terminal->IsCapable[fsSkipTransfer] : false;
+  FProgressForm = new TProgressForm(Application, (FTransferResumeList != NULL), AllowSkip, SynchronizeProgress);
 
   FProgressForm->DeleteLocalToRecycleBin =
     (WinConfiguration->DeleteToRecycleBin != FAlternativeDelete);
   FProgressForm->DeleteRemoteToRecycleBin =
+    (Terminal != NULL) &&
     (Terminal->SessionData->DeleteToRecycleBin != FAlternativeDelete) &&
     !Terminal->SessionData->RecycleBinPath.IsEmpty();