Skip to content

Commit 2f5ee47

Browse files
Code Quality: Prevent crash when sync root info is null (#17318)
Co-authored-by: seer-by-sentry[bot] <157164994+seer-by-sentry[bot]@users.noreply.github.com>
1 parent c64b914 commit 2f5ee47

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Files.App/Utils/Storage/Helpers/SyncRootHelpers.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ private static unsafe (bool Success, ulong Capacity, ulong Used) GetSyncRootQuot
6060
return (false, 0, 0);
6161
}
6262

63+
if (syncRootInfo is null)
64+
{
65+
return (false, 0, 0);
66+
}
67+
6368
return GetSyncRootQuotaFromSyncRootId(syncRootInfo.Id);
6469
}
6570
}

0 commit comments

Comments
 (0)