Commit 00528d72 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@3739 b35dd754-fafc-0310-a699-88a17e54d16e
parent 71d8614f
......@@ -56,8 +56,9 @@ public class RosterAccess 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
boolean isSubscribed = RosterItem.SUB_BOTH == item.getSubStatus() ||
RosterItem.SUB_FROM == item.getSubStatus();
boolean isSubscribed = item != null && (
RosterItem.SUB_BOTH == item.getSubStatus() ||
RosterItem.SUB_FROM == item.getSubStatus());
if (isSubscribed) {
// Get list of groups where the contact belongs
List<String> contactGroups = new ArrayList<String>(item.getGroups());
......
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