mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Fix possible NPEs
This commit is contained in:
parent
45d3d40c6f
commit
eef19677ab
1 changed files with 6 additions and 0 deletions
|
@ -102,6 +102,9 @@ public class XPipeUrlAction implements ActionProvider {
|
|||
var entry = DataStorage.get()
|
||||
.getStoreEntryIfPresent(UUID.fromString(args.get(1)))
|
||||
.orElseThrow();
|
||||
if (!entry.getValidity().isUsable()) {
|
||||
return null;
|
||||
}
|
||||
return new LaunchAction(entry);
|
||||
}
|
||||
case "action" -> {
|
||||
|
@ -112,6 +115,9 @@ public class XPipeUrlAction implements ActionProvider {
|
|||
var entry = DataStorage.get()
|
||||
.getStoreEntryIfPresent(UUID.fromString(args.get(2)))
|
||||
.orElseThrow();
|
||||
if (!entry.getValidity().isUsable()) {
|
||||
return null;
|
||||
}
|
||||
return new CallAction(provider, entry);
|
||||
}
|
||||
default -> {
|
||||
|
|
Loading…
Reference in a new issue