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

Commit 2b571f8

Browse files
Checking if RepositoryManager is null if cache events come in before
initialization
1 parent 7592d24 commit 2b571f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,15 @@ private void CacheContainer_OnCacheInvalidated(CacheType cacheType)
259259
break;
260260

261261
case CacheType.GitLogCache:
262-
repositoryManager.UpdateGitLog();
262+
repositoryManager?.UpdateGitLog();
263263
break;
264264

265265
case CacheType.GitStatusCache:
266-
repositoryManager.UpdateGitStatus();
266+
repositoryManager?.UpdateGitStatus();
267267
break;
268268

269269
case CacheType.GitLocksCache:
270-
repositoryManager.UpdateLocks();
270+
repositoryManager?.UpdateLocks();
271271
break;
272272

273273
case CacheType.GitUserCache:

0 commit comments

Comments
 (0)