From 6fa9a14d79a5aa8b194c1eb5e1c68d7332469c5d Mon Sep 17 00:00:00 2001 From: James Montemagno Date: Fri, 26 Jan 2018 11:19:49 -0800 Subject: [PATCH] Return if service/context is null --- src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs b/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs index 3e5bb37..b3c956e 100644 --- a/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs +++ b/src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs @@ -648,7 +648,10 @@ public void OnServiceConnected(ComponentName name, IBinder service) Service = IInAppBillingServiceStub.AsInterface(service); if (Service == null || Context == null) + { tcsConnect?.TrySetResult(false); + return; + } var pkgName = Context.PackageName;