Skip to content

Commit 5103a62

Browse files
authored
Fix: Fixed crash when calculating window bounds (#13967)
1 parent 9d9d39c commit 5103a62

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Files.App/Views/PaneHolderPage.xaml.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) 2023 Files Community
22
// Licensed under the MIT License. See the LICENSE.
33

4-
using Files.App.UserControls.TabBar;
54
using Microsoft.UI.Input;
65
using Microsoft.UI.Xaml;
76
using Microsoft.UI.Xaml.Controls;
@@ -80,7 +79,15 @@ public bool IsMultiPaneActive
8079
=> IsRightPaneVisible;
8180

8281
public bool IsMultiPaneEnabled
83-
=> MainWindow.Instance.Bounds.Width > DualPaneWidthThreshold;
82+
{
83+
get
84+
{
85+
if (App.AppModel.IsMainWindowClosed)
86+
return false;
87+
else
88+
return MainWindow.Instance.Bounds.Width > DualPaneWidthThreshold;
89+
}
90+
}
8491

8592
private NavigationParams _NavParamsLeft;
8693
public NavigationParams NavParamsLeft

0 commit comments

Comments
 (0)