Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c53c02

Browse files
authored
Protect against no activeDocument. (microsoft#2875)
1 parentb864126 commit8c53c02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Extension/src/LanguageServer/clientCollection.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class ClientCollection {
119119
this.languageClients.set(key,cpptools.createNullClient());
120120
}
121121

122-
if(this.activeClient===client){
122+
if(this.activeClient===client&&this.activeDocument){
123123
this.activeClient=this.getClientFor(this.activeDocument.uri);
124124
this.activeClient.activeDocumentChanged(this.activeDocument);
125125
}
@@ -154,7 +154,7 @@ export class ClientCollection {
154154
client.TrackedDocuments.forEach(document=>this.transferOwnership(document,client));
155155
client.TrackedDocuments.clear();
156156

157-
if(this.activeClient===client){
157+
if(this.activeClient===client&&this.activeDocument){
158158
// Need to make a different client the active client.
159159
this.activeClient=this.getClientFor(this.activeDocument.uri);
160160
this.activeClient.activeDocumentChanged(this.activeDocument);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp