diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 7ffc1216905..2dea2e4b4a4 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -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 diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java index 14cbd434dfb..d25fce9532e 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupDirector.java @@ -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() ); }