Skip to content

Commit 2795501

Browse files
committed
Fixes #90: Performing null checks because for some cases we can´t retrieve a Statusbar
1 parent e51efa4 commit 2795501

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BuildVision/Services/StatusBarNotificationService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ private void SetText(string str, bool freezeOutput = false)
4242
}
4343

4444
var statusBar = _serviceProvider.GetService<IVsStatusbar>();
45-
statusBar.FreezeOutput(0);
46-
statusBar.SetText(str);
45+
statusBar?.FreezeOutput(0);
46+
statusBar?.SetText(str);
4747
if (freezeOutput)
4848
{
49-
statusBar.FreezeOutput(1);
49+
statusBar?.FreezeOutput(1);
5050
}
5151
}
5252
}

0 commit comments

Comments
 (0)