From 5d30c8ac26d1d3a8d613d82bbb70d34b8b242735 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Tue, 13 Feb 2007 16:21:24 +0000 Subject: [PATCH] Fixed another possible null case. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7083 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/Roster.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/Roster.java b/source/org/jivesoftware/smack/Roster.java index e8d5b95f8..dd30dfa12 100644 --- a/source/org/jivesoftware/smack/Roster.java +++ b/source/org/jivesoftware/smack/Roster.java @@ -488,7 +488,13 @@ public class Roster implements ConnectionListener { return new Presence(Presence.Type.unavailable); } else { - return userPresences.get(resource); + Presence presence = userPresences.get(resource); + if (presence == null) { + return new Presence(Presence.Type.unavailable); + } + else { + return presence; + } } }