Fix --buildtype=debug build error message
Fixes error:
.../bmcweb/redfish-core/include/event_service_manager.hpp:175:34:
...
potential null pointer dereference [-Werror=null-dereference]
Tested: No longer see this error with buildtype debug
Change-Id: Id245e09267eb52e8eac2bf4eb0e94489409eac2e
Signed-off-by: Abiola Asojo <abiola.asojo@ibm.com>
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index c05417c..638c0b8 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -172,6 +172,10 @@
const nlohmann::json::object_t* obj =
jsonData.get_ptr<const nlohmann::json::object_t*>();
+ if (obj == nullptr)
+ {
+ return;
+ }
for (const auto& item : *obj)
{
if (item.first == "Configuration")