Prevent null pointer exception

This commit is contained in:
Daniel Imms
2016-09-13 01:31:06 -07:00
committed by GitHub
parent 7e58057032
commit 73865bce26

View File

@@ -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);
}
}
}