commit | a5c8cc9a3215cfafca13d75189e3cd02fa02a1d7 | [log] [tgz] |
---|---|---|
author | Jeffrey Overbey <jeffreyoverbey@acm.org> | Fri May 29 19:21:01 2009 +0000 |
committer | Jeffrey Overbey <jeffreyoverbey@acm.org> | Fri May 29 19:21:01 2009 +0000 |
tree | 3d2e2fcc3e21d3c1169b9ab2777fcfd458c3c79c | |
parent | 57e7de5ae4c965997587b05a7e2db7ced9be2718 [diff] |
Added null check
diff --git a/org.eclipse.photran.ui/src/org/eclipse/photran/internal/ui/actions/FortranEditorActionDelegate.java b/org.eclipse.photran.ui/src/org/eclipse/photran/internal/ui/actions/FortranEditorActionDelegate.java index 55930be..0ac4ba9 100644 --- a/org.eclipse.photran.ui/src/org/eclipse/photran/internal/ui/actions/FortranEditorActionDelegate.java +++ b/org.eclipse.photran.ui/src/org/eclipse/photran/internal/ui/actions/FortranEditorActionDelegate.java
@@ -33,6 +33,7 @@ import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.internal.Workbench; import org.eclipse.ui.progress.IProgressService; /** @@ -66,6 +67,9 @@ public void run(IAction action) { + if (this.window == null) + this.window = Workbench.getInstance().getActiveWorkbenchWindow(); + if (this.window != null) { IEditorPart editor = this.window.getActivePage().getActiveEditor();