Skip to content

Commit

Permalink
Fix NPE on Group multi-invite.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal authored and greyson-signal committed Jul 28, 2020
1 parent 745a7f7 commit 8e45a54
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.thoughtcrime.securesms.util.DefaultValueLiveData;

import java.util.Collection;
import java.util.Objects;

public abstract class GroupMemberEntry {

Expand Down Expand Up @@ -152,15 +153,15 @@ public boolean equals(@Nullable Object obj) {

PendingMember other = (PendingMember) obj;
return other.invitee.equals(invitee) &&
other.inviteeCipherText.equals(inviteeCipherText) &&
Objects.equals(other.inviteeCipherText, inviteeCipherText) &&
other.cancellable == cancellable;
}

@Override
public int hashCode() {
int hash = invitee.hashCode();
hash *= 31;
hash += inviteeCipherText.hashCode();
hash += Objects.hashCode(inviteeCipherText);
hash *= 31;
return hash + (cancellable ? 1 : 0);
}
Expand Down

0 comments on commit 8e45a54

Please sign in to comment.