aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-13 23:03:58 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-13 23:03:58 +0200
commit0025cf65dd70f215ad10007bde8302ea7f17e735 (patch)
treefd622385009dc926af8e789eb642921f16d5471a /src/main/java/de/pixart
parent9f06d99f6a7c09f3b0c3637ccc6fec6f296494d0 (diff)
do not crash on some very rare logging
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index dc2728540..0fb8a90fd 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -1379,7 +1379,7 @@ public class XmppConnectionService extends Service {
if (message.fixCounterpart()) {
conversation.startOtrSession(message.getCounterpart().getResourcepart(), true);
} else {
- Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not fix counterpart for OTR message to contact " + message.getContact().getJid());
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not fix counterpart for OTR message to contact " + message.getCounterpart());
break;
}
} else {
@@ -2006,6 +2006,10 @@ public class XmppConnectionService extends Service {
try {
X509Certificate[] chain = KeyChain.getCertificateChain(XmppConnectionService.this, alias);
Pair<Jid, String> info = CryptoHelper.extractJidAndName(chain[0]);
+ if (info == null) {
+ callback.informUser(R.string.certificate_does_not_contain_jid);
+ return;
+ }
if (findAccountByJid(info.first) == null) {
Account account = new Account(info.first, "");
account.setPrivateKeyAlias(alias);