1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 03:45:35 +02:00

fixed error when new config created with non-c project selected

This commit is contained in:
David Inglis 2004-06-21 13:21:36 +00:00
parent b0f3f77bad
commit a09023fa41

View file

@ -362,6 +362,9 @@ public class CMainTab extends CLaunchConfigurationTab {
*/ */
protected IBinary[] getBinaryFiles(final ICProject cproject) { protected IBinary[] getBinaryFiles(final ICProject cproject) {
final Display display; final Display display;
if (cproject == null || !cproject.exists()) {
return null;
}
if (getShell() == null) { if (getShell() == null) {
display = LaunchUIPlugin.getShell().getDisplay(); display = LaunchUIPlugin.getShell().getDisplay();
} else { } else {
@ -533,7 +536,7 @@ public class CMainTab extends CLaunchConfigurationTab {
IBinary binary = null; IBinary binary = null;
if (cElement instanceof ICProject) { if (cElement instanceof ICProject) {
IBinary[] bins = getBinaryFiles((ICProject)cElement); IBinary[] bins = getBinaryFiles((ICProject)cElement);
if (bins.length == 1) { if (bins != null && bins.length == 1) {
binary = bins[0]; binary = bins[0];
} }
} }