mirror of
https://github.com/xpipe-io/xpipe.git
synced 2025-04-17 01:33:36 +00:00
Fix possible NPE
This commit is contained in:
parent
92f319d20c
commit
acebff1445
1 changed files with 5 additions and 2 deletions
|
@ -57,8 +57,11 @@ public class AskpassExchangeImpl extends AskpassExchange
|
|||
})
|
||||
.orElse(null);
|
||||
|
||||
passwords.put(msg.getId(), r);
|
||||
requestToId.put(msg.getRequest(), msg.getId());
|
||||
// If the result is null, assume that the operation was aborted by the user
|
||||
if (r != null) {
|
||||
passwords.put(msg.getId(), r);
|
||||
requestToId.put(msg.getRequest(), msg.getId());
|
||||
}
|
||||
|
||||
return Response.builder().value(r != null ? r.getSecretValue() : null).build();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue