From 390f1f07a4aeac09ee532f487bb6e1db9f105161 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 31 Oct 2023 08:52:17 -0400 Subject: [PATCH] Retrieve current ADM PurchasingListener assuming it returns a nullable. --- .../core/internal/purchases/impl/TrackAmazonPurchase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/purchases/impl/TrackAmazonPurchase.kt b/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/purchases/impl/TrackAmazonPurchase.kt index 7afb2e8ca0..6d511e9dcb 100644 --- a/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/purchases/impl/TrackAmazonPurchase.kt +++ b/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/purchases/impl/TrackAmazonPurchase.kt @@ -121,7 +121,7 @@ internal class TrackAmazonPurchase( if (!canTrack) return try { val curPurchasingListener = - listenerHandlerField!![listenerHandlerObject] as PurchasingListener + listenerHandlerField!!.get(listenerHandlerObject) as PurchasingListener? if (curPurchasingListener !== osPurchasingListener) { osPurchasingListener!!.orgPurchasingListener = curPurchasingListener setListener()