mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 464222 - Trying to create a new remote launch gives a NPE
This could happen if a project was selected before creating the launch and the project was missing a project description. For example, if the .cproject was missing. Change-Id: I3ecea6c4ee3cd3939c07ade361b2180fd86e6949 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
parent
01a1046fa1
commit
9f39b4828d
1 changed files with 4 additions and 2 deletions
|
@ -152,8 +152,10 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
|
||||||
config.setMappedResources(new IResource[] {cProject.getProject()});
|
config.setMappedResources(new IResource[] {cProject.getProject()});
|
||||||
|
|
||||||
ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
|
ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
|
||||||
String buildConfigID = projDes.getActiveConfiguration().getId();
|
if (projDes != null) {
|
||||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
|
String buildConfigID = projDes.getActiveConfiguration().getId();
|
||||||
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, name);
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue