diff --git a/src/caosdb/configuration.cpp b/src/caosdb/configuration.cpp index d8a3050d82323689e7ee2ffb76084669257042ff..4d893a717a7d8ea08b23ad21111d9ee2f98be1bc 100644 --- a/src/caosdb/configuration.cpp +++ b/src/caosdb/configuration.cpp @@ -468,7 +468,7 @@ auto ConfigurationManager::InitializeDefaults() -> int { // NOLINT } // Logging in the configuration leads to additional content. - if (WRAPPED_JSON_CONFIGURATION(this)->is_object() && + if (!this->json_configuration.IsNull() && WRAPPED_JSON_CONFIGURATION(this)->is_object() && WRAPPED_JSON_CONFIGURATION(this)->as_object().contains("logging")) { LoggingConfiguration logging_configuration = CreateLoggingConfiguration(WRAPPED_JSON_CONFIGURATION(this)->at("logging").as_object()); @@ -479,7 +479,7 @@ auto ConfigurationManager::InitializeDefaults() -> int { // NOLINT "We are using the default configuration"; } - if (configuration_file_path != nullptr && WRAPPED_JSON_CONFIGURATION(this)->is_object()) { + if (configuration_file_path != nullptr && !this->json_configuration.IsNull() && WRAPPED_JSON_CONFIGURATION(this)->is_object() { CAOSDB_LOG_INFO(logger_name) << "Loaded configuration from " << *(configuration_file_path) << "."; } diff --git a/src/caosdb/utility.cpp b/src/caosdb/utility.cpp index 58d7c9736945fd9439b2aea0f902761713d919ba..1329dca14978d06311e8a7d5b54970e925477d9a 100644 --- a/src/caosdb/utility.cpp +++ b/src/caosdb/utility.cpp @@ -147,7 +147,7 @@ auto load_json_file(const path &json_file) -> JsonValue { JsonValue::~JsonValue() { this->Reset(); } auto JsonValue::Reset() -> void { - void * tmp = std::move(this->wrapped); + void *tmp = std::move(this->wrapped); this->wrapped = nullptr; if (tmp != nullptr) { delete static_cast<value *>(tmp);