Fixed nullpointer exception when highsore doesn't exist

This commit is contained in:
jancoow
2015-07-09 13:37:41 +02:00
parent 1edab2daac
commit f3f1a11a75
+3 -1
View File
@@ -62,7 +62,9 @@ public class SQLConnector
try {
result.next();
hsc = new Highscore(si, result.getString("username"), result.getInt("score"), result.getDate("date").getTime());
if(result != null)
hsc = new Highscore(si, result.getString("username"), result.getInt("score"), result.getDate("date").getTime());
} catch (SQLException e) {
e.printStackTrace();
}