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:
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();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue