Skip to content

Commit 2bccabe

Browse files
authored
Added a null check (#6682)
1 parent 87aa4aa commit 2bccabe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Files/DataModels/NavigationControlItems/DriveItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public async Task UpdatePropertiesAsync()
179179
var properties = await Root.Properties.RetrievePropertiesAsync(new[] { "System.FreeSpace", "System.Capacity" })
180180
.AsTask().WithTimeoutAsync(TimeSpan.FromSeconds(5));
181181

182-
if (properties["System.Capacity"] != null && properties["System.FreeSpace"] != null)
182+
if (properties != null && properties["System.Capacity"] != null && properties["System.FreeSpace"] != null)
183183
{
184184
MaxSpace = ByteSize.FromBytes((ulong)properties["System.Capacity"]);
185185
FreeSpace = ByteSize.FromBytes((ulong)properties["System.FreeSpace"]);

0 commit comments

Comments
 (0)