mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-06-12 17:32:20 +00:00
Check for a null directory coming back from preferences before using it
This commit is contained in:
parent
949986e056
commit
a2622bf1e7
|
@ -170,7 +170,11 @@ public class SwingAppleCommander extends JFrame implements ActionListener {
|
|||
*/
|
||||
protected void openFile() {
|
||||
JFileChooser jc = new JFileChooser();
|
||||
jc.setCurrentDirectory(new File(userPreferences.getDiskImageDirectory()));
|
||||
String pathName = userPreferences.getDiskImageDirectory();
|
||||
if (null == pathName) {
|
||||
pathName = ""; //$NON-NLS-1$
|
||||
}
|
||||
jc.setCurrentDirectory(new File(pathName));
|
||||
EmulatorFileFilter ff = new EmulatorFileFilter();
|
||||
jc.setFileFilter(ff);
|
||||
int rc = jc.showDialog(this, textBundle.get("Open")); //$NON-NLS-1$
|
||||
|
|
Loading…
Reference in New Issue
Block a user