Skip to content

Commit 7bfcdf6

Browse files
committed
fix: fix NRE when configuration is invalid
and so _httpClient is not set occuring when commit form is opened
1 parent 5a85fe9 commit 7bfcdf6

File tree

1 file changed

+1
-1
lines changed
  • src/GitExtensions.AzureDevOpsCommitMessage

1 file changed

+1
-1
lines changed

src/GitExtensions.AzureDevOpsCommitMessage/Plugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public override void Unregister(IGitUICommands gitUiCommands)
322322

323323
private void gitUiCommands_PreCommit(object sender, GitUIEventArgs e)
324324
{
325-
if (!_enabledSettings.ValueOrDefault(Settings))
325+
if (_httpClient == null || !_enabledSettings.ValueOrDefault(Settings))
326326
{
327327
return;
328328
}

0 commit comments

Comments
 (0)