From a09023fa41ba90856517e92a3bc89dee8753c70d Mon Sep 17 00:00:00 2001 From: David Inglis Date: Mon, 21 Jun 2004 13:21:36 +0000 Subject: [PATCH] fixed error when new config created with non-c project selected --- .../src/org/eclipse/cdt/launch/ui/CMainTab.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 fded30e7b25..1cda4555925 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 @@ -362,6 +362,9 @@ public class CMainTab extends CLaunchConfigurationTab { */ protected IBinary[] getBinaryFiles(final ICProject cproject) { final Display display; + if (cproject == null || !cproject.exists()) { + return null; + } if (getShell() == null) { display = LaunchUIPlugin.getShell().getDisplay(); } else { @@ -533,7 +536,7 @@ public class CMainTab extends CLaunchConfigurationTab { IBinary binary = null; if (cElement instanceof ICProject) { IBinary[] bins = getBinaryFiles((ICProject)cElement); - if (bins.length == 1) { + if (bins != null && bins.length == 1) { binary = bins[0]; } }