Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 1855e9b

Browse files
Checking if CurrentLocks is null first
1 parent f441bbd commit 1855e9b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/SettingsView.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ private void MaybeUpdateData()
218218
if (locksHaveChanged)
219219
{
220220
locksHaveChanged = false;
221-
lockedFiles = Repository.CurrentLocks.ToList();
221+
var repositoryCurrentLocks = Repository.CurrentLocks;
222+
lockedFiles = repositoryCurrentLocks != null
223+
? repositoryCurrentLocks.ToList()
224+
: new List<GitLock>();
222225
}
223226
}
224227

0 commit comments

Comments
 (0)