mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-25 09:55:52 +00:00
Prevent potential NPEs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user