}
private static void scheduleEditorClose(IEditorPart editorPart) {
- SWTUtils.asyncExec(editorPart.getSite().getShell(), () -> {
+ if (editorPart == null)
+ return;
+ SWTUtils.asyncExec(editorPart.getSite().getWorkbenchWindow().getShell(), () -> {
// Don't have to check isDisposed since closeEditor
// will ignore already closed editor parts.
WorkbenchUtils.closeEditor(editorPart, false);