Browse Source

Failure on startup due to an uninitialized variable from 8e197efb

Source commit: 1ad276b6a8bfb4e68b013d221795632ed3c9e092
Martin Prikryl 1 year ago
parent
commit
3f8321781d
1 changed files with 5 additions and 1 deletions
  1. 5 1
      source/packages/filemng/DriveView.pas

+ 5 - 1
source/packages/filemng/DriveView.pas

@@ -2023,7 +2023,11 @@ begin {FindNodeToPath}
       end;
       Node := Selected;
       RootNode := GetDriveStatus(Drive).RootNode;
-      if Assigned(Node) then
+      if not Assigned(Node) then
+      begin
+        SelectionHierarchyHeight := 0;
+      end
+        else
       begin
         SelectionHierarchyHeight := Node.Level + 1;
         SetLength(SelectionHierarchy, SelectionHierarchyHeight);