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

Commit c0eaca2

Browse files
SettingsView needs to check if Repository is null
The SettingsView is one of the few Views that needs to check for Repository being null. As it is used in the "Initialize Repository" workflow.
1 parent ca56968 commit c0eaca2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ public override void OnEnable()
5151
userSettingsView.OnEnable();
5252
AttachHandlers(Repository);
5353

54-
Repository.CheckCurrentRemoteChangedEvent(lastCurrentRemoteChangedEvent);
55-
Repository.CheckLocksChangedEvent(lastLocksChangedEvent);
54+
if (Repository != null)
55+
{
56+
Repository.CheckCurrentRemoteChangedEvent(lastCurrentRemoteChangedEvent);
57+
Repository.CheckLocksChangedEvent(lastLocksChangedEvent);
58+
}
59+
5660
metricsHasChanged = true;
5761
}
5862

0 commit comments

Comments
 (0)