Skip to content

Commit ee2fb9e

Browse files
committed
Fix: Fixed potential COMException when updating preview pane selection (#13919)
1 parent 6af697b commit ee2fb9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Views/LayoutModes/BaseLayout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ protected void UpdatePreviewPaneSelection(List<ListedItem>? value)
14481448
InfoPaneViewModel.SelectedItem = value?.Count == 1 ? value.First() : null;
14491449

14501450
// Check if the preview pane is open before updating the model
1451-
if (InfoPaneViewModel.IsEnabled)
1451+
if (InfoPaneViewModel.IsEnabled && !App.AppModel.IsMainWindowClosed)
14521452
{
14531453
var isPaneEnabled = ((MainWindow.Instance.Content as Frame)?.Content as MainPage)?.ShouldPreviewPaneBeActive ?? false;
14541454
if (isPaneEnabled)

0 commit comments

Comments
 (0)