mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 03:27:59 +01:00
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:
parent
ce9c75d057
commit
842527ecdb
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue