aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-27 11:09:50 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-03-27 11:09:50 +0100
commit291dc4c36c72abda41cbfff9d665d0f95b1dbb5a (patch)
tree8d2e3db6f88c997da0f607ebdd5822807499d574
parentf99887d7cad3cdc0bd0df7be59e65cf63675bb4e (diff)
fixed null pointer with missing status msg
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 90aac54e..57a028e7 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -278,9 +278,14 @@ public class XmppConnectionService extends Service {
Element x = packet.findChild("x","jabber:x:signed");
if (x != null) {
try {
- contact.setPgpKeyId(pgp.fetchKeyId(
- packet.findChild("status")
- .getContent(), x
+ Element status = packet.findChild("status");
+ String msg;
+ if (status!=null) {
+ msg = status.getContent();
+ } else {
+ msg = "";
+ }
+ contact.setPgpKeyId(pgp.fetchKeyId(msg, x
.getContent()));
} catch (OpenPgpException e) {
Log.d(LOGTAG, "faulty pgp. just ignore");