Skip to content

Commit a77620f

Browse files
authored
Code Quality: Fixed ArgumentNullException in ShellViewModel.CheckForBackgroundImage() (#15796)
1 parent 1227e93 commit a77620f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Files.App/ViewModels/ShellViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,9 +1738,9 @@ await Task.Run(async () =>
17381738

17391739
await OrderFilesAndFoldersAsync();
17401740
await ApplyFilesAndFoldersChangesAsync();
1741+
await dispatcherQueue.EnqueueOrInvokeAsync(CheckForSolutionFile, Microsoft.UI.Dispatching.DispatcherQueuePriority.Low);
17411742
await dispatcherQueue.EnqueueOrInvokeAsync(() =>
17421743
{
1743-
CheckForSolutionFile();
17441744
GetDesktopIniFileData();
17451745
CheckForBackgroundImage();
17461746
},
@@ -1813,7 +1813,7 @@ private void GetDesktopIniFileData()
18131813

18141814
public void CheckForBackgroundImage()
18151815
{
1816-
var filesAppSection = DesktopIni.FirstOrDefault(x => x.SectionName == "FilesApp");
1816+
var filesAppSection = DesktopIni?.FirstOrDefault(x => x.SectionName == "FilesApp");
18171817
if (filesAppSection is null || folderSettings.LayoutMode is FolderLayoutModes.ColumnView)
18181818
{
18191819
FolderBackgroundImageSource = null;

0 commit comments

Comments
 (0)