mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-22 15:40:31 -04:00
Fix some NPEs
This commit is contained in:
@@ -47,6 +47,10 @@ public class BrowserFileSystemHelper {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (model.getFileSystem() == null) {
|
||||
return path;
|
||||
}
|
||||
|
||||
var shell = model.getFileSystem().getShell();
|
||||
if (shell.isEmpty() || !shell.get().isRunning(true)) {
|
||||
return path;
|
||||
|
||||
@@ -43,8 +43,13 @@ public class BrowserOverviewComp extends SimpleComp {
|
||||
var common = sc.getOsType().determineInterestingPaths(sc).stream()
|
||||
.map(s -> FileEntry.ofDirectory(model.getFileSystem(), s))
|
||||
.filter(entry -> {
|
||||
var fs = model.getFileSystem();
|
||||
if (fs == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return model.getFileSystem().directoryExists(entry.getPath());
|
||||
return fs.directoryExists(entry.getPath());
|
||||
} catch (Exception e) {
|
||||
ErrorEvent.fromThrowable(e).handle();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user