libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 82 forks source link

added if (helper != null) { ..... } to avoid crashes #22

Closed just4phil closed 9 years ago

just4phil commented 9 years ago

Hi, i have some issues with crashes, so this is kind of a "hotfix" as long as i couldnt fix the real problem.

i added if (helper != null) { ..... } to avoid crashes in cases where there is no helper object or the wrong purchasemanager has been bound.

this shouldnt be a bad addition

bye phil

noblemaster commented 9 years ago

Great idea! :) One minor change: could you add an else-condition and output an error message via Log.e(...) so we know there was a problem during restore rather than letting it fail silently?

just4phil commented 9 years ago

done!

just4phil commented 9 years ago

added the same to purchase(), too sorry for the 4 commits :)