diff --git a/src/caosdb/configuration.cpp b/src/caosdb/configuration.cpp index 7d6a6f0c66be8d7ef058a603b8fea7c0da11574a..ed3385a8262107e70b099764cbda6f6065bfaf8b 100644 --- a/src/caosdb/configuration.cpp +++ b/src/caosdb/configuration.cpp @@ -508,7 +508,8 @@ auto ConfigurationManager::InitializeDefaults() -> int { mLoadSingleJSONConfiguration(*configuration_file_path); } - if (this->json_configuration.as_object().contains("logging")) { + if (this->json_configuration.is_object() && + this->json_configuration.as_object().contains("logging")) { LoggingConfiguration logging_configuration = logging_configuration_helper.CreateLoggingConfiguration( json_configuration.at("logging").as_object());