From 6bb7764d723f6fcaba7ec5e85d8404e28ca52fda Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 31 Mar 2014 09:45:39 +0200 Subject: [PATCH] null pointer fix --- src/eu/siacs/conversations/utils/MessageParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eu/siacs/conversations/utils/MessageParser.java b/src/eu/siacs/conversations/utils/MessageParser.java index 4bdb2539..936d0e9a 100644 --- a/src/eu/siacs/conversations/utils/MessageParser.java +++ b/src/eu/siacs/conversations/utils/MessageParser.java @@ -133,6 +133,9 @@ public class MessageParser { } else { return null; } + if (forwarded==null) { + return null; + } Element message = forwarded.findChild("message"); if ((message == null) || (!message.hasChild("body"))) return null; // either malformed or boring