mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fixed NPE when no editor is open.
This commit is contained in:
parent
947fd5b342
commit
7056946b85
1 changed files with 5 additions and 1 deletions
|
@ -805,8 +805,12 @@ public class DOMAST extends ViewPart {
|
||||||
private void makeActions() {
|
private void makeActions() {
|
||||||
loadActiveEditorAction = new Action() {
|
loadActiveEditorAction = new Action() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// first make sure there is an open editor
|
||||||
|
IEditorPart editor = getActiveEditor();
|
||||||
|
if (editor != null) {
|
||||||
openDOMASTView(getActiveEditor());
|
openDOMASTView(getActiveEditor());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
loadActiveEditorAction.setText(LOAD_ACTIVE_EDITOR);
|
loadActiveEditorAction.setText(LOAD_ACTIVE_EDITOR);
|
||||||
loadActiveEditorAction.setToolTipText(LOAD_ACTIVE_EDITOR);
|
loadActiveEditorAction.setToolTipText(LOAD_ACTIVE_EDITOR);
|
||||||
|
|
Loading…
Add table
Reference in a new issue