1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 22:22:11 +02:00

[305667] Possible NPE in CSourceFinder (applied patch)

This commit is contained in:
John Cortell 2010-03-12 13:49:01 +00:00
parent ce38a4facd
commit 83736061cd

View file

@ -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;
}
}