Avoid NPE in settings tab

This commit is contained in:
0xb00bface 2021-09-02 11:40:57 +02:00
parent 805097c7ec
commit e05c9657e4
1 changed files with 8 additions and 8 deletions

View File

@ -192,17 +192,17 @@ public class CamrecApplication extends Application {
}
private void initSites() {
for (Site site : sites) {
if (site.isEnabled()) {
try {
site.setRecorder(recorder);
site.setConfig(config);
sites.stream().forEach(site -> {
try {
site.setRecorder(recorder);
site.setConfig(config);
if (site.isEnabled()) {
site.init();
} catch (Exception e) {
LOG.error("Error while initializing site {}", site.getName(), e);
}
} catch (Exception e) {
LOG.error("Error while initializing site {}", site.getName(), e);
}
}
});
}
private void startOnlineMonitor() {