Fix OpenProjectEvent

This commit is contained in:
Oystein Kristoffer Tveit 2021-04-25 21:27:58 +02:00
parent 445155ed33
commit e274ac5e87
1 changed files with 4 additions and 1 deletions

View File

@ -106,7 +106,10 @@ public class FiletreeController implements Initializable, Controller {
@Subscribe
private void handle(OpenProjectEvent event) {
this.showTree(event.getPath().toString());
event.getPath().ifPresentOrElse(
path -> this.showTree(path.toString()),
() -> System.err.println("[ERROR]: OpenProjectEvent was empty!")
);
}
@Subscribe