From 9f39b4828d81af86004ff4ebf290756053fac86f Mon Sep 17 00:00:00 2001 From: Marc-Andre Laperle Date: Wed, 29 Apr 2015 01:33:52 -0400 Subject: [PATCH] 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 --- .../org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java index c9c6bfec18b..578f6eb6b03 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CLaunchConfigurationTab.java @@ -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);