Skip to content

Commit 5634f4c

Browse files
yaira2hishitetsu
andauthored
Code Quality: Fixed COMException with WinUI Desktop Window (#15638)
Co-authored-by: hishitetsu <[email protected]>
1 parent 98a1ed6 commit 5634f4c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,19 @@ public bool IsMultiPaneActive
4747
=> GetPaneCount() > 1;
4848

4949
public bool IsMultiPaneEnabled
50-
=> !AppModel.IsMainWindowClosed && MainWindow.Instance.Bounds.Width > Constants.UI.MultiplePaneWidthThreshold;
50+
{
51+
get
52+
{
53+
try
54+
{
55+
return !AppModel.IsMainWindowClosed && MainWindow.Instance.Bounds.Width > Constants.UI.MultiplePaneWidthThreshold;
56+
}
57+
catch
58+
{
59+
return false;
60+
}
61+
}
62+
}
5163

5264
public IShellPage ActivePaneOrColumn
5365
{

0 commit comments

Comments
 (0)