Skip to content

Commit 0cdd0a4

Browse files
committed
Guard against incomingSettings being null
1 parent 9e5c661 commit 0cdd0a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PowerShellEditorServices/Services/Workspace/Handlers/ConfigurationHandler.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ await _powerShellContextService.SetWorkingDirectoryAsync(
157157
private void SendFeatureChangesTelemetry(LanguageServerSettingsWrapper incomingSettings)
158158
{
159159
var configChanges = new Dictionary<string, bool>();
160+
if (incomingSettings == null)
161+
{
162+
this._logger.LogTrace("Incoming settings were null");
163+
return;
164+
}
165+
160166
// Send telemetry if the user opted-out of ScriptAnalysis
161167
if (incomingSettings.Powershell.ScriptAnalysis.Enable == false &&
162168
_configurationService.CurrentSettings.ScriptAnalysis.Enable != incomingSettings.Powershell.ScriptAnalysis.Enable)

0 commit comments

Comments
 (0)