Skip to content

Commit

Permalink
Fixes #90: Performing null checks because for some cases we can´t ret…
Browse files Browse the repository at this point in the history
…rieve a Statusbar
  • Loading branch information
StefanKert committed Jul 17, 2020
1 parent e51efa4 commit 2795501
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/BuildVision/Services/StatusBarNotificationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ private void SetText(string str, bool freezeOutput = false)
}

var statusBar = _serviceProvider.GetService<IVsStatusbar>();
statusBar.FreezeOutput(0);
statusBar.SetText(str);
statusBar?.FreezeOutput(0);
statusBar?.SetText(str);
if (freezeOutput)
{
statusBar.FreezeOutput(1);
statusBar?.FreezeOutput(1);
}
}
}
Expand Down

0 comments on commit 2795501

Please sign in to comment.