From 3b39a5f5853ee6cf4e23801614d52840d44cc7ae Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 24 Jul 2003 17:59:00 +0000 Subject: [PATCH] Fix for PR 40696. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 5 +++++ .../internal/core/sourcelookup/CProjectSourceLocation.java | 2 ++ 2 files changed, 7 insertions(+) diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index ca0c65b5b59..f534cdb30c7 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2003-07-24 Mikhail Khodjaiants + Fix for PR 40696. If the project contains the reference to a project that is + deleted from the workspace the source locator tries to get the location of deleted project. + * CProjectSourceLocation.java + 2003-07-22 Mikhail Khodjaiants Create a special type of ICDIVariable (ErrorVariable) if request to gdb fails. * CVariable.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java index 145e9b7cfa3..eeec690075d 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java @@ -160,6 +160,8 @@ public class CProjectSourceLocation implements IProjectSourceLocation private Object findFileByRelativePath( IContainer container, String fileName ) { IPath rootPath = container.getLocation(); + if ( rootPath == null ) + return null; IPath path = rootPath.append( fileName ); Object result = findFileByAbsolutePath( path.toOSString() ); if ( result == null )