mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 08:12:05 +01:00
Prevents adding items to groups with no name (NULL)
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2239 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
a8eeb87a64
commit
777f8937e4
1 changed files with 4 additions and 2 deletions
|
@ -248,7 +248,7 @@ public class Roster {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cretaes a new roster entry and prsence subscription. The server will asynchronously
|
* Creates a new roster entry and presence subscription. The server will asynchronously
|
||||||
* update the roster with the subscription status.
|
* update the roster with the subscription status.
|
||||||
*
|
*
|
||||||
* @param user the user.
|
* @param user the user.
|
||||||
|
@ -263,7 +263,9 @@ public class Roster {
|
||||||
RosterPacket.Item item = new RosterPacket.Item(user, name);
|
RosterPacket.Item item = new RosterPacket.Item(user, name);
|
||||||
if (groups != null) {
|
if (groups != null) {
|
||||||
for (int i=0; i<groups.length; i++) {
|
for (int i=0; i<groups.length; i++) {
|
||||||
item.addGroupName(groups[i]);
|
if (groups[i] != null) {
|
||||||
|
item.addGroupName(groups[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rosterPacket.addRosterItem(item);
|
rosterPacket.addRosterItem(item);
|
||||||
|
|
Loading…
Reference in a new issue