mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-28 12:16:44 +00:00
Fix potential NPE
This commit is contained in:
@@ -490,8 +490,9 @@ public class BrowserFileTransferOperation {
|
||||
if (!same) {
|
||||
var sourceShell = sourceFs.getShell().orElseThrow();
|
||||
var targetShell = targetFs.getShell().orElseThrow();
|
||||
return !sourceShell.getStdout().isClosed()
|
||||
&& !targetShell.getStdin().isClosed();
|
||||
// Check for null on shell reset
|
||||
return sourceShell.getStdout() != null && !sourceShell.getStdout().isClosed()
|
||||
&& targetShell.getStdin() != null && !targetShell.getStdin().isClosed();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user