Browse Source

Invalid assertion

Source commit: c2dc0d4c9ea0432ae7b469c22b6b792f71f3e026
Martin Prikryl 4 years ago
parent
commit
d98b72806c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      source/components/UnixDriveView.cpp

+ 2 - 2
source/components/UnixDriveView.cpp

@@ -910,9 +910,9 @@ TObject * TCustomUnixDriveView::SaveState()
   TTreeNode * Node = Items->GetFirstNode();
   while (Node != NULL)
   {
-    if (Node->Expanded)
+    // Node->HasChildren would be false in extreme cases only (like while closing the window)
+    if (Node->Expanded && Node->HasChildren)
     {
-      DebugAssert(Node->HasChildren);
       ExpandedNodes->Add(NodePathName(Node));
     }
     Node = Node->GetNext();