Added null checks for objects before sending bytes in SWGList

This commit is contained in:
Waverunner
2014-10-22 10:44:00 -04:00
parent a24bacde1a
commit ba70448f80
+8
View File
@@ -407,7 +407,15 @@ public class SWGList<E> extends Delta implements List<E> {
int size = 0;
for (Object o : list) {
if (o == null) {
System.err.println("ERROR: Null object in SWGList!");
continue;
}
byte[] object = Baseline.toBytes(o);
if (object == null) {
System.err.println("ERROR: Null Baseline.toBytes in SWGList!");
continue;
}
size += object.length;
IoBuffer buffer = createBuffer(size);