Skip to content

Commit

Permalink
[Android] Fix for edge case crash on brave news settings
Browse files Browse the repository at this point in the history
  • Loading branch information
samartnik committed Nov 13, 2024
1 parent 2f34c66 commit 2ffd39f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public BraveNewsPreferencesTypeAdapter(
mBraveNewsPreferencesType = braveNewsPreferencesType;
mPublisherList = publisherList;
mChannelList = channelList;
// Init channel list as an empty array if it is null to avoid null pointer crashes.
if (mChannelList == null) mChannelList = new ArrayList<>();
if (mChannelList.size() > 0) {
mChannelIcons = BraveNewsUtils.getChannelIcons();
}
Expand Down

0 comments on commit 2ffd39f

Please sign in to comment.