mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-18 13:38:57 -04:00
Fix NPE
This commit is contained in:
@@ -30,7 +30,9 @@ public class OpenTerminalInDirectoryMenuProvider implements BrowserMenuLeafProvi
|
||||
? List.of(model.getCurrentDirectory().getPath())
|
||||
: Collections.singletonList((FilePath) null);
|
||||
for (var dir : dirs) {
|
||||
var name = model.getFileSystem().supportsTerminalWorkingDirectory() ? dir.toString() : null;
|
||||
// IntelliJ says the null check is not needed, but it is!
|
||||
// noinspection all
|
||||
var name = model.getFileSystem().supportsTerminalWorkingDirectory() && dir != null ? dir.toString() : null;
|
||||
model.openTerminalAsync(
|
||||
name,
|
||||
model.getFileSystem().supportsTerminalWorkingDirectory() ? dir : null,
|
||||
|
||||
Reference in New Issue
Block a user