mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
[305667] Possible NPE in CSourceFinder (applied patch)
This commit is contained in:
parent
ce38a4facd
commit
83736061cd
1 changed files with 3 additions and 2 deletions
|
@ -119,7 +119,7 @@ public class CSourceFinder implements ISourceFinder, ILaunchConfigurationListene
|
||||||
ILaunch[] launches = lmgr.getLaunches();
|
ILaunch[] launches = lmgr.getLaunches();
|
||||||
for (ILaunch launch : launches) {
|
for (ILaunch launch : launches) {
|
||||||
ILaunchConfiguration config = launch.getLaunchConfiguration();
|
ILaunchConfiguration config = launch.getLaunchConfiguration();
|
||||||
if (isMatch(config)) {
|
if (config != null && isMatch(config)) {
|
||||||
ISourceLocator launchLocator = launch.getSourceLocator();
|
ISourceLocator launchLocator = launch.getSourceLocator();
|
||||||
// in practice, a launch locator is always an ISourceLookupDirector
|
// in practice, a launch locator is always an ISourceLookupDirector
|
||||||
if (launchLocator instanceof 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
|
// searching using an inactive launch configuration's locator, then the
|
||||||
// new launch's locator should take precedence
|
// new launch's locator should take precedence
|
||||||
for (ILaunch launch : launches) {
|
for (ILaunch launch : launches) {
|
||||||
if (isMatch(launch.getLaunchConfiguration())) {
|
ILaunchConfiguration config = launch.getLaunchConfiguration();
|
||||||
|
if (config != null && isMatch(config)) {
|
||||||
fLaunchLocator = null;
|
fLaunchLocator = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue