mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-08-15 13:56:47 +00:00
Fix possible NPEs
This commit is contained in:
@@ -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 -> {
|
||||
|
||||
Reference in New Issue
Block a user