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:
parent
b3a55927df
commit
e1d592c130
1 changed files with 3 additions and 1 deletions
|
@ -277,7 +277,9 @@ public class CMainTab extends CLaunchConfigurationTab {
|
||||||
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
|
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
|
||||||
*/
|
*/
|
||||||
public void performApply(ILaunchConfigurationWorkingCopy config) {
|
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_PROJECT_NAME, fProjText.getText());
|
||||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText());
|
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, fProgText.getText());
|
||||||
if (fTerminalButton != null) {
|
if (fTerminalButton != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue