You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Querying sku might lead to crash if 'mService' is null
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user