1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 00:45:28 +02:00

Bug 278632 - NPE in CSourceViewerConfiguration on non file:// IFileStores, patch by Andrew Eidsness

This commit is contained in:
Anton Leherbauer 2009-06-03 10:30:51 +00:00
parent f497c46b26
commit e868cbb696

View file

@ -957,7 +957,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) {