Skip to content

Commit be7bf3c

Browse files
authored
Fix: Fixed null ref in sidebar pinned model (#13964)
1 parent 0cc9759 commit be7bf3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Data/Models/SidebarPinnedModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public async Task<LocationItem> CreateLocationItemFromPathAsync(string path)
100100
if (res || (FilesystemResult)FolderHelpers.CheckFolderAccessWithWin32(path))
101101
{
102102
locationItem.IsInvalid = false;
103-
if (res)
103+
if (res && res.Result is not null)
104104
{
105105
var iconData = await FileThumbnailHelper.LoadIconFromStorageItemAsync(res.Result, 16u, ThumbnailMode.ListView, ThumbnailOptions.UseCurrentScale);
106106
locationItem.IconData = iconData;

0 commit comments

Comments
 (0)