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

Removed an NPE when cancel was selected from browse dialog on path or file options

This commit is contained in:
Sean Evoy 2004-04-13 19:39:42 +00:00
parent 51a8ec8e42
commit 3a76c4f68c

View file

@ -492,10 +492,10 @@ public class FileListControl {
SelectPathInputDialog dialog = new SelectPathInputDialog(getListControl().getShell(), title, message, initVal, null, browseType);
if (dialog.open() == SelectPathInputDialog.OK) {
input = dialog.getValue();
if (input == null || input.length() == 0) return ""; //$NON-NLS-1$
}
// Double-quote the spaces in paths (if any)
if (input != null && input.length() > 0) {
switch (browseType) {
case IOption.BROWSE_DIR:
case IOption.BROWSE_FILE:
@ -508,8 +508,8 @@ public class FileListControl {
default:
break;
}
}
return input;
}
}