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

Commit 81d8787

Browse files
authored
Merge pull request #322 from github-for-unity/fixes/locks-might-be-null
Checking if CurrentLocks is null to update SettingsView
2 parents e6c15b4 + 654fbc7 commit 81d8787

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
@@ -236,7 +236,10 @@ private void MaybeUpdateData()
236236
if (locksHaveChanged)
237237
{
238238
locksHaveChanged = false;
239-
lockedFiles = Repository.CurrentLocks.ToList();
239+
var repositoryCurrentLocks = Repository.CurrentLocks;
240+
lockedFiles = repositoryCurrentLocks != null
241+
? repositoryCurrentLocks.ToList()
242+
: new List<GitLock>();
240243
}
241244
}
242245

0 commit comments

Comments
 (0)