fixed NPE exception deriving from unhandled bas case in SocketHandler.listAccounts

parent e5090bd1
Pipeline #2505 failed with stages
in 8 minutes and 28 seconds
......@@ -245,9 +245,11 @@ public class SocketHandler implements Runnable {
private void listAccounts(JsonRequest request) throws JsonProcessingException, IOException {
// We have to create a manager for each account that we're listing, which is all of them :/
File[] users = new File(data_path + "/data").listFiles();
for(int i = 0; i < users.length; i++) {
if(!users[i].isDirectory()) {
getManager(users[i].getName());
if(users != null) {
for(int i = 0; i < users.length; i++) {
if(!users[i].isDirectory()) {
getManager(users[i].getName());
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment