Check if custom name is null before assuming it is

This commit is contained in:
libraryaddict 2014-06-02 03:23:02 +12:00
parent 5bfd6c5541
commit 0afcef09b5

View File

@ -149,7 +149,7 @@ public class LivingWatcher extends FlagWatcher {
}
public void setCustomName(String name) {
if (name.length() > 64)
if (name != null && name.length() > 64)
name = name.substring(0, 64);
setValue(10, name);
sendData(10);