From 619e93bce1649fa4f23e1f989e9ebf216a1c6105 Mon Sep 17 00:00:00 2001 From: James Montemagno Date: Sun, 1 Apr 2018 17:16:53 -0700 Subject: [PATCH] Add null checks around introductory price --- src/Plugin.InAppBilling.iOS/InAppBillingImplementation.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin.InAppBilling.iOS/InAppBillingImplementation.cs b/src/Plugin.InAppBilling.iOS/InAppBillingImplementation.cs index 7b83ae8..794eb24 100644 --- a/src/Plugin.InAppBilling.iOS/InAppBillingImplementation.cs +++ b/src/Plugin.InAppBilling.iOS/InAppBillingImplementation.cs @@ -66,8 +66,8 @@ public async override Task> GetProductInfoAsync ProductId = p.ProductIdentifier, Description = p.LocalizedDescription, CurrencyCode = p.PriceLocale?.CurrencyCode ?? string.Empty, - LocalizedIntroductoryPrice = IsiOS112 ? p.IntroductoryPrice.LocalizedPrice() : string.Empty, - MicrosIntroductoryPrice = IsiOS112 ? (long)(p.IntroductoryPrice.Price.DoubleValue * 1000000d) : 0 + LocalizedIntroductoryPrice = IsiOS112 ? (p.IntroductoryPrice?.LocalizedPrice() ?? string.Empty) : string.Empty, + MicrosIntroductoryPrice = IsiOS112 ? (long)((p.IntroductoryPrice?.Price?.DoubleValue ?? 0) * 1000000d) : 0 }); }