Browse Source

Failure when switching/opening/closed session caused by Bug 1057

Source commit: 8b61613a74f1cd54538603f016b9c9674ce0138f
Martin Prikryl 4 years ago
parent
commit
3203dec49c
2 changed files with 7 additions and 0 deletions
  1. 1 0
      source/components/UnixDirView.cpp
  2. 6 0
      source/packages/filemng/CustomDirView.pas

+ 1 - 0
source/components/UnixDirView.cpp

@@ -596,6 +596,7 @@ TObject * __fastcall TUnixDirView::SaveState()
 void __fastcall TUnixDirView::AnnounceState(TObject * State)
 void __fastcall TUnixDirView::AnnounceState(TObject * State)
 {
 {
   TObject * CustomDirViewState = NULL;
   TObject * CustomDirViewState = NULL;
+  FAnnouncedDriveViewState = NULL;
   if (State != NULL)
   if (State != NULL)
   {
   {
     TUnixDirViewState * UnixDirViewState = dynamic_cast<TUnixDirViewState *>(State);
     TUnixDirViewState * UnixDirViewState = dynamic_cast<TUnixDirViewState *>(State);

+ 6 - 0
source/packages/filemng/CustomDirView.pas

@@ -615,6 +615,7 @@ end;
 type
 type
   TDirViewState = class(TObject)
   TDirViewState = class(TObject)
   public
   public
+    constructor Create;
     destructor Destroy; override;
     destructor Destroy; override;
 
 
   private
   private
@@ -625,6 +626,11 @@ type
     FocusedItem: string;
     FocusedItem: string;
   end;
   end;
 
 
+constructor TDirViewState.Create;
+begin
+  inherited;
+end;
+
 destructor TDirViewState.Destroy;
 destructor TDirViewState.Destroy;
 begin
 begin
   HistoryPaths.Free;
   HistoryPaths.Free;