Skip to content

Commit

Permalink
Fixed possible Nullpointexception when checking subscription status i…
Browse files Browse the repository at this point in the history
…n Java (#608)
  • Loading branch information
Jethro87 authored Jan 22, 2025
1 parent 0e521e0 commit 466fd0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code_blocks/customers/customer-info_12.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
if (customerInfo.getEntitlements().get(<your_entitlement_id>).isActive()) {
if (customerInfo.getEntitlements().get(<your_entitlement_id>) != null
&& customerInfo.getEntitlements().get(<your_entitlement_id>).isActive()) {
// user has access to "your_entitlement_id"
}

0 comments on commit 466fd0f

Please sign in to comment.