mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Prevent null pointer exception
This commit is contained in:
@@ -150,7 +150,11 @@ export class FocusActiveGroupAction extends Action {
|
||||
}
|
||||
|
||||
public run(): TPromise<any> {
|
||||
this.editorService.getActiveEditor().focus();
|
||||
const activeEditor = this.editorService.getActiveEditor();
|
||||
if (activeEditor) {
|
||||
activeEditor.focus();
|
||||
}
|
||||
|
||||
return TPromise.as(true);
|
||||
}
|
||||
}
|
||||
@@ -1312,4 +1316,4 @@ export class MoveEditorToRightGroupAction extends Action {
|
||||
|
||||
return TPromise.as(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user