Commit 68b98892 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed NPE when TO was not included in IQ packet. JM-439

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2975 b35dd754-fafc-0310-a699-88a17e54d16e
parent f47b175c
......@@ -38,7 +38,7 @@ public class IQLastActivityHandler extends IQHandler implements ServerFeaturesPr
IQ reply = IQ.createResultIQ(packet);
Element lastActivity = reply.setChildElement("query", "jabber:iq:last");
String sender = packet.getFrom().getNode();
String username = packet.getTo().getNode();
String username = packet.getTo() == null ? null : packet.getTo().getNode();
// Check if any of the usernames is null
if (sender == null || username == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment