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:
parent
b0f3f77bad
commit
a09023fa41
1 changed files with 4 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue