From dee132bb266afeb7cbbaab6cad70c2922da2e0fc 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 26206988c20..42b4ed45da0 100644 --- a/lib/icingadb/icingadb-objects.cpp +++ b/lib/icingadb/icingadb-objects.cpp @@ -1570,6 +1570,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);