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

Commit 1d8ef57

Browse files
committed
Null checks are important here
1 parent 23c7be0 commit 1d8ef57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ProjectWindowInterface : AssetPostprocessor
2323
private static ILogging Logger { get { return logger = logger ?? LogHelper.GetLogger<ProjectWindowInterface>(); } }
2424
private static CacheUpdateEvent lastRepositoryStatusChangedEvent;
2525
private static CacheUpdateEvent lastLocksChangedEvent;
26-
private static IRepository Repository { get { return manager.Environment.Repository; } }
26+
private static IRepository Repository { get { return manager != null ? manager.Environment.Repository : null; } }
2727
private static bool IsInitialized { get { return Repository != null && Repository.CurrentRemote.HasValue; } }
2828

2929
public static void Initialize(IApplicationManager theManager)

0 commit comments

Comments
 (0)