We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d79a72c commit 3f29e4eCopy full SHA for 3f29e4e
src/Files.App/Data/Items/DriveItem.cs
@@ -248,10 +248,12 @@ public async Task LoadThumbnailAsync(bool isSidebar = false)
248
{
249
if (!string.IsNullOrEmpty(DeviceID) && !string.Equals(DeviceID, "network-folder"))
250
IconData ??= await FileThumbnailHelper.LoadIconWithoutOverlayAsync(DeviceID, 24);
251
-
252
- using var thumbnail = await DriveHelpers.GetThumbnailAsync(Root);
253
- IconData ??= await thumbnail.ToByteArrayAsync();
254
+
+ if (Root is not null)
+ {
+ using var thumbnail = await DriveHelpers.GetThumbnailAsync(Root);
255
+ IconData ??= await thumbnail.ToByteArrayAsync();
256
+ }
257
IconData ??= UIHelpers.GetSidebarIconResourceInfo(Constants.ImageRes.Folder).IconData;
258
}
259
0 commit comments