From 83736061cd5dc4555cb033f9099cfdfdbc4dce93 Mon Sep 17 00:00:00 2001 From: John Cortell Date: Fri, 12 Mar 2010 13:49:01 +0000 Subject: [PATCH] [305667] Possible NPE in CSourceFinder (applied patch) --- .../cdt/debug/internal/core/srcfinder/CSourceFinder.java | 5 +++-- 1 file 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; } }