Fixed: NullPointerException
This commit is contained in:
@@ -352,7 +352,7 @@ public class InnerCoreServer {
|
||||
BehaviorPack pack = new BehaviorPack(file.getAbsolutePath());
|
||||
pack.load();
|
||||
}catch (Exception e) {
|
||||
Logger.error("Error loaded behavior pack " + file.getAbsolutePath());
|
||||
Logger.error("Error loaded behavior pack " + file.getAbsolutePath(), e);
|
||||
}
|
||||
}
|
||||
}catch (Exception ignore){}
|
||||
|
||||
@@ -83,8 +83,10 @@ public class BehaviorPack {
|
||||
for(BehaviorContent content : contents_api){
|
||||
final String pathFolder = this.path + content.getDefaultDirectory();
|
||||
final String[] files = new File(pathFolder).list();
|
||||
for(String file : files)
|
||||
loadFileContext(pathFolder+"/"+file);
|
||||
if(files != null) {
|
||||
for (String file : files)
|
||||
loadFileContext(pathFolder + "/" + file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user