diff options
author | Ken Ryall | 2007-03-01 13:29:01 +0000 |
---|---|---|
committer | Ken Ryall | 2007-03-01 13:29:01 +0000 |
commit | e1d592c130e5106a5828e3532e8eb69610c0ddc8 (patch) | |
tree | 1a50cf3d7b05b912329a21666e4cd42a42835d64 /launch | |
parent | b3a55927df00585b3411637607a705d9b72ec339 (diff) | |
download | org.eclipse.cdt-e1d592c130e5106a5828e3532e8eb69610c0ddc8.tar.gz org.eclipse.cdt-e1d592c130e5106a5828e3532e8eb69610c0ddc8.tar.xz org.eclipse.cdt-e1d592c130e5106a5828e3532e8eb69610c0ddc8.zip |
Fix NPE when creating a config when no project is selected.
Diffstat (limited to 'launch')
-rw-r--r-- | launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java index 56f50cd78fc..8612c258d53 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java @@ -277,7 +277,9 @@ public class CMainTab extends CLaunchConfigurationTab { * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) */ public void performApply(ILaunchConfigurationWorkingCopy config) { - config.setMappedResources(new IResource[] { this.getCProject().getProject() }); + ICProject cProject = this.getCProject(); + if (cProject != null) + config.setMappedResources(new IResource[] { cProject.getProject() }); config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText()); config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText()); if (fTerminalButton != null) { |