From 466fd0fa8099cc7bb3cf32a6935ca1d837780533 Mon Sep 17 00:00:00 2001 From: Jeffrey Bunn Date: Wed, 22 Jan 2025 08:56:27 -0800 Subject: [PATCH] Fixed possible Nullpointexception when checking subscription status in Java (#608) --- code_blocks/customers/customer-info_12.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code_blocks/customers/customer-info_12.java b/code_blocks/customers/customer-info_12.java index 8e438f6a..d3f53067 100644 --- a/code_blocks/customers/customer-info_12.java +++ b/code_blocks/customers/customer-info_12.java @@ -1,3 +1,4 @@ -if (customerInfo.getEntitlements().get().isActive()) { +if (customerInfo.getEntitlements().get() != null + && customerInfo.getEntitlements().get().isActive()) { // user has access to "your_entitlement_id" } \ No newline at end of file