Skip to content

Commit 9e5c661

Browse files
committed
Safely set result on s_editorObjectReady
As it can fail if the editor is being re-initialized.
1 parent f9ab558 commit 9e5c661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PowerShellEditorServices/Extensions/EditorObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public EditorContext GetEditorContext()
137137
internal void SetAsStaticInstance()
138138
{
139139
EditorObject.Instance = this;
140-
s_editorObjectReady.SetResult(true);
140+
s_editorObjectReady.TrySetResult(true);
141141
}
142142
}
143143
}

0 commit comments

Comments
 (0)