Fixed ArrayIndexOutOfBounds with new User (No nicknames in db)

This commit is contained in:
Rsl1122 2017-08-24 22:46:13 +03:00
parent db935fb981
commit caece02f63

View File

@ -59,7 +59,9 @@ public class DataCache extends SessionCache {
List<String> nicknames = null;
try {
nicknames = db.getNicknamesTable().getNicknames(uuid);
return nicknames.get(nicknames.size() - 1);
if (!nicknames.isEmpty()) {
return nicknames.get(nicknames.size() - 1);
}
} catch (SQLException e) {
Log.toLog(this.getClass().getName(), e);
}