[joscar] r521 committed - Fixed potential crash that can occur with ICQ and apparently someone w...

1 view
Skip to first unread message

jos...@googlecode.com

unread,
Nov 30, 2009, 8:19:56 PM11/30/09
to joscar-...@googlegroups.com
Revision: 521
Author: jadestorm
Date: Mon Nov 30 17:18:54 2009
Log: Fixed potential crash that can occur with ICQ and apparently someone
who has no groups in their buddy list at all. Amusingly enough only if you
bother to print the object.
http://code.google.com/p/joscar/source/detail?r=521

Modified:
/trunk/protocol/src/net/kano/joscar/ssiitem/RootItem.java

=======================================
--- /trunk/protocol/src/net/kano/joscar/ssiitem/RootItem.java Thu Jun 30
22:25:44 2005
+++ /trunk/protocol/src/net/kano/joscar/ssiitem/RootItem.java Mon Nov 30
17:18:54 2009
@@ -200,10 +200,12 @@
public synchronized String toString() {
StringBuffer buffer = new StringBuffer();

- for (int groupid : groupids) {
- buffer.append("0x");
- buffer.append(Integer.toHexString(groupid));
- buffer.append(", ");
+ if (groupids != null) {
+ for (int groupid : groupids) {
+ buffer.append("0x");
+ buffer.append(Integer.toHexString(groupid));
+ buffer.append(", ");
+ }
}

return "RootItem with groupids: " + buffer;
Reply all
Reply to author
Forward
0 new messages