From 842527ecdb897731a53d88b27b6852b85c84a361 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Fri, 7 Mar 2003 19:46:49 +0000 Subject: [PATCH] Added null check. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1840 b35dd754-fafc-0310-a699-88a17e54d16e --- .../org/jivesoftware/smack/filter/FromContainsFilter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/filter/FromContainsFilter.java b/source/org/jivesoftware/smack/filter/FromContainsFilter.java index 1356c2d2e..0e887b09a 100644 --- a/source/org/jivesoftware/smack/filter/FromContainsFilter.java +++ b/source/org/jivesoftware/smack/filter/FromContainsFilter.java @@ -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; + } } }