1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Querying sku might lead to crash if 'mService' is null

This commit is contained in:
Xavier Sellier
2018-05-17 14:06:50 -04:00
parent 7c8849f4e9
commit ac49392627

View File

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