Added null check.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1840 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-03-07 19:46:49 +00:00 committed by mtucker
parent ce9c75d057
commit 842527ecdb
1 changed files with 6 additions and 1 deletions

View File

@ -76,6 +76,11 @@ public class FromContainsFilter implements PacketFilter {
}
public boolean accept(Packet packet) {
return packet.getFrom().indexOf(from) != -1;
if (packet.getFrom() != null) {
return packet.getFrom().indexOf(from) != -1;
}
else {
return false;
}
}
}