Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-04-09 21:51:01 +0000
committerEugene Tarassov2013-04-09 21:51:01 +0000
commit3d20618e12bb9cb3d6954d72abd9c7ee5066f0bd (patch)
tree1cdc011605dc6d37a4111be3f3620fd8ea0e0829
parent3bdb217f288a6e69f47955634aa7430758cd8c82 (diff)
downloadorg.eclipse.tcf-3d20618e12bb9cb3d6954d72abd9c7ee5066f0bd.tar.gz
org.eclipse.tcf-3d20618e12bb9cb3d6954d72abd9c7ee5066f0bd.tar.xz
org.eclipse.tcf-3d20618e12bb9cb3d6954d72abd9c7ee5066f0bd.zip
TCF Debugger: fixed NPE when a workspace resource (a C-file) is out of sync
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java3
1 files changed, 2 insertions, 1 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 eace5876c..c5817de1f 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
@@ -61,7 +61,8 @@ public class TCFLaunchContext implements ITCFLaunchContext {
return ((IResource)selection).getLocation();
}
if (selection instanceof ICElement) {
- return ((ICElement)selection).getResource().getLocation();
+ IResource res = ((ICElement)selection).getResource();
+ if (res != null) return res.getLocation();
}
return null;
}

Back to the top