| author | Pawel Piech | 2012-01-26 00:22:53 (EST) |
|---|---|---|
| committer | Eugene Tarassov | 2012-01-26 17:16:17 (EST) |
| commit | 3862e13b6e4a62adf3865bc5b2349cd146ea2e9d (patch) (side-by-side diff) | |
| tree | 2b3e276b234ca0e6dd38bfab3b46ec4309727003 | |
| parent | afd9a45d5af37286c9e6101cbb409d99e277bea3 (diff) | |
| download | org.eclipse.tcf-3862e13b6e4a62adf3865bc5b2349cd146ea2e9d.zip org.eclipse.tcf-3862e13b6e4a62adf3865bc5b2349cd146ea2e9d.tar.gz org.eclipse.tcf-3862e13b6e4a62adf3865bc5b2349cd146ea2e9d.tar.bz2 | |
Bug 369769 - NPE in TCFLaunchContext.getContext()
| -rw-r--r-- | plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java index 89b6a5a..2843226 100644 --- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java +++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java @@ -137,10 +137,13 @@ public class TCFLaunchContext implements ITCFLaunchContext { if (ce != null && ce.exists()) return ce; return (ICElement)obj; } - IEditorPart part = page.getActiveEditor(); - if (part != null) { - IEditorInput input = part.getEditorInput(); - return (ICElement)input.getAdapter(ICElement.class); + if (page != null) { + IEditorPart part = page.getActiveEditor(); + + if (part != null) { + IEditorInput input = part.getEditorInput(); + return (ICElement)input.getAdapter(ICElement.class); + } } return null; } |

