Skip to content

Commit

Permalink
Resolve crash in brave wallet with null check (uplift to 1.75.x) (#27209
Browse files Browse the repository at this point in the history
)

Uplift of #27204 (squashed) to beta
  • Loading branch information
brave-builds authored Jan 13, 2025
1 parent 48a38ce commit bffc799
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ public static boolean accountIdsEqual(AccountId left, AccountId right) {
return left.uniqueKey.equals(right.uniqueKey);
}

public static boolean accountIdsEqual(AccountInfo left, AccountInfo right) {
public static boolean accountIdsEqual(@Nullable AccountInfo left, @Nullable AccountInfo right) {
// Return false if either account is null since we can't compare null accounts
// This is a fix to avoid https://github.com/brave/brave-browser/issues/43261
if (left == null || right == null) {
return false;
}
return accountIdsEqual(left.accountId, right.accountId);
}

Expand Down

0 comments on commit bffc799

Please sign in to comment.