mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
avoid some NPEs
This commit is contained in:
parent
3e3cb047be
commit
0664d6ac7b
@ -365,7 +365,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|
||||
break;
|
||||
case Message.ENCRYPTION_AXOLOTL:
|
||||
AxolotlService axolotlService = conversation.getAccount().getAxolotlService();
|
||||
if (axolotlService.trustedSessionVerified(conversation)) {
|
||||
if (axolotlService != null && axolotlService.trustedSessionVerified(conversation)) {
|
||||
mEditMessage.setHint(getString(R.string.send_omemo_x509_message));
|
||||
} else {
|
||||
mEditMessage.setHint(getString(R.string.send_omemo_message));
|
||||
|
@ -227,10 +227,11 @@ public class DNSHelper {
|
||||
}
|
||||
|
||||
public static boolean isIp(final String server) {
|
||||
return PATTERN_IPV4.matcher(server).matches()
|
||||
return server != null && (
|
||||
PATTERN_IPV4.matcher(server).matches()
|
||||
|| PATTERN_IPV6.matcher(server).matches()
|
||||
|| PATTERN_IPV6_6HEX4DEC.matcher(server).matches()
|
||||
|| PATTERN_IPV6_HEX4DECCOMPRESSED.matcher(server).matches()
|
||||
|| PATTERN_IPV6_HEXCOMPRESSED.matcher(server).matches();
|
||||
|| PATTERN_IPV6_HEXCOMPRESSED.matcher(server).matches());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user