diff options
author | John Cortell | 2010-03-12 13:49:01 +0000 |
---|---|---|
committer | John Cortell | 2010-03-12 13:49:01 +0000 |
commit | 83736061cd5dc4555cb033f9099cfdfdbc4dce93 (patch) | |
tree | ac285cb89dd2070b709ddae96e9256dab7e4bfc0 /debug/org.eclipse.cdt.debug.core | |
parent | ce38a4facd5ff0e29062702015451c35a2f82165 (diff) | |
download | org.eclipse.cdt-83736061cd5dc4555cb033f9099cfdfdbc4dce93.tar.gz org.eclipse.cdt-83736061cd5dc4555cb033f9099cfdfdbc4dce93.tar.xz org.eclipse.cdt-83736061cd5dc4555cb033f9099cfdfdbc4dce93.zip |
[305667] Possible NPE in CSourceFinder (applied patch)
Diffstat (limited to 'debug/org.eclipse.cdt.debug.core')
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java index ef4f6793b13..30ce03e2e61 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java @@ -119,7 +119,7 @@ public class CSourceFinder implements ISourceFinder, ILaunchConfigurationListene ILaunch[] launches = lmgr.getLaunches(); for (ILaunch launch : launches) { ILaunchConfiguration config = launch.getLaunchConfiguration(); - if (isMatch(config)) { + if (config != null && isMatch(config)) { ISourceLocator launchLocator = launch.getSourceLocator(); // in practice, a launch locator is always an ISourceLookupDirector if (launchLocator instanceof ISourceLookupDirector) { @@ -373,7 +373,8 @@ public class CSourceFinder implements ISourceFinder, ILaunchConfigurationListene // searching using an inactive launch configuration's locator, then the // new launch's locator should take precedence for (ILaunch launch : launches) { - if (isMatch(launch.getLaunchConfiguration())) { + ILaunchConfiguration config = launch.getLaunchConfiguration(); + if (config != null && isMatch(config)) { fLaunchLocator = null; } } |