From f9a4b71037c82379cb1be8c255cbc5d0af17c048 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sun, 13 Dec 2020 18:07:19 +0100 Subject: [PATCH] fix crash error when following doesn't exist in shared user state --- .../io/lbry/browser/tasks/wallet/LoadSharedUserStateTask.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/io/lbry/browser/tasks/wallet/LoadSharedUserStateTask.java b/app/src/main/java/io/lbry/browser/tasks/wallet/LoadSharedUserStateTask.java index 0bf93baa..323a1949 100644 --- a/app/src/main/java/io/lbry/browser/tasks/wallet/LoadSharedUserStateTask.java +++ b/app/src/main/java/io/lbry/browser/tasks/wallet/LoadSharedUserStateTask.java @@ -130,6 +130,10 @@ public class LoadSharedUserStateTask extends AsyncTask { } protected boolean isNotificationsDisabledForSubUrl(String url, JSONArray following) { + if (following == null) { + return true; + } + try { for (int i = 0; i < following.length(); i++) { JSONObject item = following.getJSONObject(i);