From eef19677ab59f25bd8d2205cfe3e168f063ebfe0 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 15 Jan 2024 15:11:35 +0000 Subject: [PATCH] Fix possible NPEs --- .../main/java/io/xpipe/ext/base/action/XPipeUrlAction.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/base/src/main/java/io/xpipe/ext/base/action/XPipeUrlAction.java b/ext/base/src/main/java/io/xpipe/ext/base/action/XPipeUrlAction.java index eb06ed0cb..af096e3af 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/action/XPipeUrlAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/action/XPipeUrlAction.java @@ -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 -> {