1
0
Fork 0
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:
Marc-Andre Laperle 2015-04-29 01:33:52 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 01a1046fa1
commit 9f39b4828d

View file

@ -152,8 +152,10 @@ public abstract class CLaunchConfigurationTab extends AbstractLaunchConfiguratio
config.setMappedResources(new IResource[] {cProject.getProject()});
ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(cProject.getProject());
String buildConfigID = projDes.getActiveConfiguration().getId();
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
if (projDes != null) {
String buildConfigID = projDes.getActiveConfiguration().getId();
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID);
}
}
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, name);