Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2011-07-08 21:55:47 +0000
committerPawel Piech2011-07-08 21:55:47 +0000
commit0676ce7d31a9a1eb97b3a459a997052fc5535ffe (patch)
tree40bb16aeec0d85b2605a2d3954cf9e15994b0c16 /org.eclipse.debug.core
parent1773b7234bb68844628d40b0371c4ee748cb6811 (diff)
downloadeclipse.platform.debug-0676ce7d31a9a1eb97b3a459a997052fc5535ffe.tar.gz
eclipse.platform.debug-0676ce7d31a9a1eb97b3a459a997052fc5535ffe.tar.xz
eclipse.platform.debug-0676ce7d31a9a1eb97b3a459a997052fc5535ffe.zip
Bug 295828 - [source lookup] NPE in ContainerSourceContainer with (invalid) linked Resources
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java29
1 files changed, 16 insertions, 13 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java
index 82a0290a0..00c5ff7f4 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ContainerSourceContainer.java
@@ -100,19 +100,22 @@ public abstract class ContainerSourceContainer extends CompositeSourceContainer
if (fRootURI == null) {
return EMPTY;
}
- // See bug 98090 - we need to handle relative path names
- IFileStore target = fRootFile.getFileStore(new Path(name));
- if (target.fetchInfo().exists()) {
- // We no longer have to account for bug 95832, and URIs take care
- // of canonical paths (fix to bug 95679 was removed).
- IFile[] files = fRoot.findFilesForLocationURI(target.toURI());
- if (isFindDuplicates() && files.length > 1) {
- for (int i = 0; i < files.length; i++) {
- sources.add(files[i]);
- }
- } else if (files.length > 0) {
- sources.add(files[0]);
- }
+ // bug 295828 root file may be null for an invalid linked resource
+ if (fRootFile != null) {
+ // See bug 98090 - we need to handle relative path names
+ IFileStore target = fRootFile.getFileStore(new Path(name));
+ if (target.fetchInfo().exists()) {
+ // We no longer have to account for bug 95832, and URIs take care
+ // of canonical paths (fix to bug 95679 was removed).
+ IFile[] files = fRoot.findFilesForLocationURI(target.toURI());
+ if (isFindDuplicates() && files.length > 1) {
+ for (int i = 0; i < files.length; i++) {
+ sources.add(files[i]);
+ }
+ } else if (files.length > 0) {
+ sources.add(files[0]);
+ }
+ }
}
}
}

Back to the top