1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Bug 460953 - SetCrossCommandWizardPage does not check for 'null' in

result for dialog.open()


Change-Id: I8bc947e5f72891138cd41fd781d5839d09381c51
This commit is contained in:
Alena Laskavaia 2015-07-20 20:37:20 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 4e6eb33e1f
commit 4459b9a317
2 changed files with 6 additions and 4 deletions

View file

@ -125,8 +125,9 @@ public class SetCrossCommandWizardPage extends MBSCustomPage {
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dirDialog = new DirectoryDialog(composite.getShell(), SWT.APPLICATION_MODAL);
String browsedDirectory = dirDialog.open();
pathTxt.setText(browsedDirectory);
if (browsedDirectory != null) {
pathTxt.setText(browsedDirectory);
}
}
});
layoutData = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);

View file

@ -60,8 +60,9 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
// open a browse dialog
DirectoryDialog dirDialog = new DirectoryDialog(composite.getShell(), SWT.APPLICATION_MODAL);
String browsedDirectory = dirDialog.open();
fDirTextBox.setText(browsedDirectory);
if (browsedDirectory != null) {
fDirTextBox.setText(browsedDirectory);
}
}
}