Fix crash if purchase service not available
This commit is contained in:
parent
82d804587a
commit
d8913ef63a
1 changed files with 6 additions and 4 deletions
|
@ -298,10 +298,12 @@ public class InAppPurchaseHelper {
|
||||||
|
|
||||||
if (buyIntentBundle != null) {
|
if (buyIntentBundle != null) {
|
||||||
PendingIntent pendingIntent = buyIntentBundle.getParcelable(RESPONSE_BUY_INTENT);
|
PendingIntent pendingIntent = buyIntentBundle.getParcelable(RESPONSE_BUY_INTENT);
|
||||||
try {
|
if (pendingIntent != null) {
|
||||||
((Activity) mContext).startIntentSenderForResult(pendingIntent.getIntentSender(), ACTIVITY_RESULT_CODE_PURCHASE_ITEM, new Intent(), 0, 0, 0);
|
try {
|
||||||
} catch (SendIntentException e) {
|
((Activity) mContext).startIntentSenderForResult(pendingIntent.getIntentSender(), ACTIVITY_RESULT_CODE_PURCHASE_ITEM, new Intent(), 0, 0, 0);
|
||||||
Log.e(e);
|
} catch (SendIntentException e) {
|
||||||
|
Log.e(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue