mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +02:00
Bug 103784: NPE in source lookup.
This commit is contained in:
parent
5d8ec23f02
commit
519a3f133b
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-07-14 Mikhail Khodjaiants
|
||||
Bug 103784: NPE in source lookup.
|
||||
* CSourceLookupDirector.java
|
||||
|
||||
2005-07-11 Mikhail Khodjaiants
|
||||
Bug 94770: Breakpoint marker messages need formatting.
|
||||
* BreakpointMessages.properties
|
||||
|
|
|
@ -106,7 +106,7 @@ public class CSourceLookupDirector extends AbstractSourceLookupDirector {
|
|||
if ( container instanceof ProjectSourceContainer ) {
|
||||
IProject project = ((ProjectSourceContainer)container).getProject();
|
||||
IPath projPath = project.getLocation();
|
||||
if ( projPath.isPrefixOf( path ) ) {
|
||||
if ( projPath != null && projPath.isPrefixOf( path ) ) {
|
||||
IFile file = ((ProjectSourceContainer)container).getProject().getFile( path.removeFirstSegments( projPath.segmentCount() ) );
|
||||
return ( file != null && file.exists() );
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class CSourceLookupDirector extends AbstractSourceLookupDirector {
|
|||
if ( container instanceof FolderSourceContainer ) {
|
||||
IContainer folder = ((FolderSourceContainer)container).getContainer();
|
||||
IPath folderPath = folder.getLocation();
|
||||
if ( folderPath.isPrefixOf( path ) ) {
|
||||
if ( folderPath != null && folderPath.isPrefixOf( path ) ) {
|
||||
IFile file = ((FolderSourceContainer)container).getContainer().getFile( path.removeFirstSegments( folderPath.segmentCount() ) );
|
||||
return ( file != null && file.exists() );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue