Fix potential NPE

This commit is contained in:
crschnick
2025-05-10 04:54:02 +00:00
parent faab29d6ff
commit 468260fc4d
@@ -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;
}