Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2009-06-03 10:30:39 +0000
committerAnton Leherbauer2009-06-03 10:30:39 +0000
commit59bdb4bf122d93ecd0f4d4ddf8c16894a13743f5 (patch)
tree22c894ded088f5a0079bf92f16d42e2c566e6e38
parent08fe62a2a1b1f1a6505e0da46aac8e2776e93513 (diff)
downloadorg.eclipse.cdt-59bdb4bf122d93ecd0f4d4ddf8c16894a13743f5.tar.gz
org.eclipse.cdt-59bdb4bf122d93ecd0f4d4ddf8c16894a13743f5.tar.xz
org.eclipse.cdt-59bdb4bf122d93ecd0f4d4ddf8c16894a13743f5.zip
Bug 278632 - NPE in CSourceViewerConfiguration on non file:// IFileStores, patch by Andrew Eidsness
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java
index d76db76e793..98837bfd83f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CSourceViewerConfiguration.java
@@ -933,7 +933,9 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
ILocationProvider locationProvider = (ILocationProvider)input.getAdapter(ILocationProvider.class);
if (locationProvider != null) {
IPath path = locationProvider.getPath(input);
- contentType = CCorePlugin.getContentType(path.lastSegment());
+ if(path != null) {
+ contentType = CCorePlugin.getContentType(path.lastSegment());
+ }
}
}
if (contentType != null) {

Back to the top