1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Fix NPE when creating a config when no project is selected.

This commit is contained in:
Ken Ryall 2007-03-01 13:29:01 +00:00
parent b3a55927df
commit e1d592c130

View file

@ -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) {