From 7174dc864d9d7e56abf4a2314011515c57ffdc6b Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 10 Nov 2023 17:43:33 +0100 Subject: [PATCH] IcingaDB#SendConfigDelete(): fix missing nullptr check before deref --- lib/icingadb/icingadb-objects.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/icingadb/icingadb-objects.cpp b/lib/icingadb/icingadb-objects.cpp index 8b129e4e841..9f6331012fc 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -1577,6 +1577,9 @@ IcingaDB::CreateConfigUpdate(const ConfigObject::Ptr& object, const String typeN void IcingaDB::SendConfigDelete(const ConfigObject::Ptr& object) { + if (!m_Rcon || !m_Rcon->IsConnected()) + return; + Type::Ptr type = object->GetReflectionType(); String typeName = type->GetName().ToLower(); String objectKey = GetObjectIdentifier(object);