null pointer fix

This commit is contained in:
Daniel Gultsch 2014-03-31 09:45:39 +02:00
parent 92e0713373
commit 6bb7764d72
1 changed files with 3 additions and 0 deletions

View File

@ -133,6 +133,9 @@ public class MessageParser {
} else { } else {
return null; return null;
} }
if (forwarded==null) {
return null;
}
Element message = forwarded.findChild("message"); Element message = forwarded.findChild("message");
if ((message == null) || (!message.hasChild("body"))) if ((message == null) || (!message.hasChild("body")))
return null; // either malformed or boring return null; // either malformed or boring