mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-22 12:41:27 +00:00
fixed NPE
This commit is contained in:
@@ -77,15 +77,15 @@ public class MainController implements Initializable, InitializationListener, Un
|
||||
private void didClickAddDirectory(ActionEvent event) {
|
||||
final DirectoryChooser dirChooser = new DirectoryChooser();
|
||||
final File file = dirChooser.showDialog(stage);
|
||||
addDirectory(file.toPath());
|
||||
if (file != null) {
|
||||
addDirectory(file.toPath());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* adds the given directory or selects it if it is already in the list of
|
||||
* directories.
|
||||
* adds the given directory or selects it if it is already in the list of directories.
|
||||
*
|
||||
* @param file
|
||||
* non-null, writable, existing directory
|
||||
* @param file non-null, writable, existing directory
|
||||
*/
|
||||
void addDirectory(final Path file) {
|
||||
if (file != null && Files.isWritable(file)) {
|
||||
|
||||
Reference in New Issue
Block a user