a-najar / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

Context is null due to improper dispose handling! #166

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm seeing lots of NPE because the context is null. The only place that makes 
the context null is in the dispose method.

In my main activity, I call dispose in onFinish.

I believe that there should be checks to see if the app is disposed at these 
three points:

269 IabHelper.startSetup
 if (!mContext.getPackageManager().queryIntentServices(serviceIntent, 0).isEmpty()) {

388 IabHelper.launchPurchaseFlow:
Bundle buyIntentBundle = mService.getBuyIntent(3, mContext.getPackageName(), 
sku, itemType, extraData);

844 IabHelper.queryPurchases
   Bundle ownedItems = mService.getPurchases(3, mContext.getPackageName(),
                    itemType, continueToken);

Am I right, or am I right?

Original issue reported on code.google.com by hunt...@gmail.com on 14 Dec 2013 at 9:08

GoogleCodeExporter commented 8 years ago
Please try the attached patch, its a quickfix but maybe helps you. Maybe Bruno 
integrate it later.

Original comment by dri...@viselabs.com on 12 Feb 2014 at 10:12

Attachments: