mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Prevent potential NPEs
This commit is contained in:
parent
671270ce40
commit
cac46dc026
1 changed files with 5 additions and 0 deletions
|
@ -300,6 +300,11 @@ public final class BrowserFileListComp extends SimpleComp {
|
|||
|
||||
private void prepareTableShortcuts(TableView<BrowserEntry> table) {
|
||||
table.addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
// Prevent post close events
|
||||
if (fileList.getFileSystemModel().isClosed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var selected = fileList.getSelection();
|
||||
var action = BrowserAction.getFlattened(fileList.getFileSystemModel(), selected).stream()
|
||||
.filter(browserAction -> browserAction.isApplicable(fileList.getFileSystemModel(), selected)
|
||||
|
|
Loading…
Reference in a new issue