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