瀏覽代碼

Bug 2168: Failure when starting with colored session

https://winscp.net/tracker/2168

Source commit: 965c21badd0755326b768f243809499837f050c8
Martin Prikryl 2 年之前
父節點
當前提交
b360c42ad5
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      source/forms/CustomScpExplorer.cpp

+ 3 - 2
source/forms/CustomScpExplorer.cpp

@@ -11624,8 +11624,9 @@ void TCustomScpExplorerForm::LocalLocalCopyCommand(TFileOperation Operation, TOp
 //---------------------------------------------------------------------------
 void __fastcall TCustomScpExplorerForm::SessionsPageControlResize(TObject *)
 {
-  // Changing tab list triggers the OnResize.
-  if (!FUpdatingSessionTabs)
+  // 1) Changing tab list triggers the OnResize.
+  // 2) Is called in TForm constructor, when we are not ready to call SessionListChanged (particularly when starting with colored session)
+  if (!FUpdatingSessionTabs && (FSessionColors != NULL))
   {
     // UpdateTabsCaptionTruncation should be enough
     SessionListChanged(true);