Skip to content

Commit

Permalink
Merge pull request #26523 from brave/android_brave_news_crash_fix
Browse files Browse the repository at this point in the history
[Android] Fix for edge case crash on brave news settings
  • Loading branch information
samartnik authored Nov 13, 2024
2 parents 2d8094b + 2ffd39f commit f723b20
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 f723b20

Please sign in to comment.