Pārlūkot izejas kodu

Bug 2168: Failure when starting with colored session

https://winscp.net/tracker/2168

Source commit: 965c21badd0755326b768f243809499837f050c8
Martin Prikryl 2 gadi atpakaļ
vecāks
revīzija
b360c42ad5
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  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);