Commit 9fcc8efd authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed potential NPE.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3740 b35dd754-fafc-0310-a699-88a17e54d16e
parent 00528d72
......@@ -52,8 +52,8 @@ public class PresenceAccess extends AccessModel {
Roster roster = server.getRosterManager().getRoster(nodeOwner.getNode());
RosterItem item = roster.getRosterItem(owner);
// Check that the subscriber is subscribe to the node owner's presence
return RosterItem.SUB_BOTH == item.getSubStatus() ||
RosterItem.SUB_FROM == item.getSubStatus();
return item != null && (RosterItem.SUB_BOTH == item.getSubStatus() ||
RosterItem.SUB_FROM == item.getSubStatus());
}
catch (UserNotFoundException e) {
return false;
......
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