Fix NPE on Group multi-invite.

master
Alan Evans 2020-07-24 18:05:35 -03:00 committed by Greyson Parrelli
parent 745a7f76ea
commit 8e45a546c9
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.DefaultValueLiveData;
import java.util.Collection;
import java.util.Objects;
public abstract class GroupMemberEntry {
@ -152,7 +153,7 @@ public abstract class GroupMemberEntry {
PendingMember other = (PendingMember) obj;
return other.invitee.equals(invitee) &&
other.inviteeCipherText.equals(inviteeCipherText) &&
Objects.equals(other.inviteeCipherText, inviteeCipherText) &&
other.cancellable == cancellable;
}
@ -160,7 +161,7 @@ public abstract class GroupMemberEntry {
public int hashCode() {
int hash = invitee.hashCode();
hash *= 31;
hash += inviteeCipherText.hashCode();
hash += Objects.hashCode(inviteeCipherText);
hash *= 31;
return hash + (cancellable ? 1 : 0);
}