mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1270 Name Completion on Shared Rosters without VCards causes NullPointerException
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12214 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
wolf.posdorfer
parent
a096f3ae1f
commit
2adda15ee2
@ -342,12 +342,17 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
}
|
||||
|
||||
for (RosterEntry re : rosterlist) {
|
||||
if (re.getName().toLowerCase().startsWith(name.toLowerCase())
|
||||
&& !namelist.contains(re.getName())) {
|
||||
if (newname == null) {
|
||||
newname = re.getName();
|
||||
try {
|
||||
if (re.getName().toLowerCase().startsWith(name.toLowerCase()) && !namelist.contains(re.getName())) {
|
||||
if (newname == null) {
|
||||
newname = re.getName();
|
||||
}
|
||||
namelist.add(re.getName());
|
||||
}
|
||||
namelist.add(re.getName());
|
||||
} catch (NullPointerException npe) {
|
||||
// AWESOME!!!
|
||||
// happens on shared rosters
|
||||
// or when no vcard is set
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user