1
0
Эх сурвалжийг харах

Invalid assertion

Source commit: c2dc0d4c9ea0432ae7b469c22b6b792f71f3e026
Martin Prikryl 4 жил өмнө
parent
commit
d98b72806c

+ 2 - 2
source/components/UnixDriveView.cpp

@@ -910,9 +910,9 @@ TObject * TCustomUnixDriveView::SaveState()
   TTreeNode * Node = Items->GetFirstNode();
   TTreeNode * Node = Items->GetFirstNode();
   while (Node != NULL)
   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));
       ExpandedNodes->Add(NodePathName(Node));
     }
     }
     Node = Node->GetNext();
     Node = Node->GetNext();