1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +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) {
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];
}
}