diff --git a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/billing/IabHelper.java b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/billing/IabHelper.java index 7573262..553f2a0 100644 --- a/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/billing/IabHelper.java +++ b/Emoji Switcher/src/main/java/com/stevenschoen/emojiswitcher/billing/IabHelper.java @@ -264,7 +264,8 @@ public void onServiceConnected(ComponentName name, IBinder service) { Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND"); serviceIntent.setPackage("com.android.vending"); - if (!mContext.getPackageManager().queryIntentServices(serviceIntent, 0).isEmpty()) { + List resolveInfoList = mContext.getPackageManager().queryIntentServices(serviceIntent, 0); + if (resolveInfoList != null && !resolveInfoList.isEmpty()) { // service available to handle that Intent mContext.bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE); }