- PurchaseController: added mHelper null check to the setup method
This commit is contained in:
parent
1c52a91b8a
commit
6eaa95a027
1 changed files with 12 additions and 2 deletions
|
@ -131,8 +131,18 @@ public class PurchaseController {
|
||||||
// Hooray, IAB is fully set up. Now, let's get an inventory of
|
// Hooray, IAB is fully set up. Now, let's get an inventory of
|
||||||
// stuff we own.
|
// stuff we own.
|
||||||
CommonUtils.debug(TAG, "Setup successful. Querying inventory.");
|
CommonUtils.debug(TAG, "Setup successful. Querying inventory.");
|
||||||
|
// need to check whether mHelper is not null. It may be null in
|
||||||
|
// case parent activity was destroyed such as action is async.
|
||||||
|
// Issue #382
|
||||||
|
if (mHelper != null)
|
||||||
|
{
|
||||||
mHelper.queryInventoryAsync(new GotInventoryListener(loadingControl),
|
mHelper.queryInventoryAsync(new GotInventoryListener(loadingControl),
|
||||||
loadingControl);
|
loadingControl);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
TrackerUtils.trackInAppBillingEvent("setup_result",
|
||||||
|
"fail: helper is null");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue