mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Patch for Devin Steffler.
Fix NPE in DOMAST View when run headless.
This commit is contained in:
parent
5ba7b6a704
commit
689000d042
1 changed files with 3 additions and 2 deletions
|
@ -712,10 +712,11 @@ public class DOMAST extends ViewPart {
|
|||
private IEditorPart getActiveEditor() {
|
||||
IEditorPart editor = null;
|
||||
|
||||
if (getSite().getPage().isEditorAreaVisible()) {
|
||||
if (getSite().getPage().isEditorAreaVisible() &&
|
||||
getSite().getPage().getActiveEditor() != null) {
|
||||
editor = getSite().getPage().getActiveEditor();
|
||||
part = editor;
|
||||
lang = lang = getLanguageFromFile(((CEditor)editor).getInputFile());
|
||||
lang = getLanguageFromFile(((CEditor)editor).getInputFile());
|
||||
}
|
||||
|
||||
return editor;
|
||||
|
|
Loading…
Add table
Reference in a new issue