Merge pull request #18979 from xsellier/bugfix/payment-manager-query-sku

Querying sku might lead to crash if 'mService' is null
This commit is contained in:
Rémi Verschelde 2018-05-17 23:19:17 +02:00 committed by GitHub
commit 8ddf0c62ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -472,6 +472,13 @@ public class PaymentsManager {
if (skuList.size() == 0) {
return;
}
if (mService == null) {
godotPaymentV3.errorSkuDetail("Payment manager is not initialized");
return;
}
// Split the sku list in blocks of no more than 20 elements.
ArrayList<ArrayList<String>> packs = new ArrayList<ArrayList<String>>();
ArrayList<String> tempList;
@ -520,8 +527,7 @@ public class PaymentsManager {
}
godotPaymentV3.completeSkuDetail();
}
}))
.start();
})).start();
}
public void setBaseSingleton(GodotPaymentV3 godotPaymentV3) {