defold / extension-iap

In-app purchase extension for Defold
MIT License
20 stars 13 forks source link

Added product and purchase null checks #58

Closed britzl closed 1 year ago

britzl commented 1 year ago

Added extra null checks when receiving products and purchases.

Fixes #47 Fixes #34

britzl commented 1 year ago

it feels strange they may have null everywhere

I agree. But we saw that productDetailsList.get(0) could return null. And it is possible to have a null element in a java.util.List so we might as well assume that this can happen throughout the code. I do not like defensive programming but if we can't trust that there is data where there is supposed to be data then it's better to check for it.