Merge pull request #9899 from Icinga/icinga2-crashes-silently-9897

IcingaDB#SendConfigDelete(): fix missing nullptr check before deref
This commit is contained in:
Julian Brost 2023-11-21 11:03:28 +01:00 committed by GitHub
commit d2a7117007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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);