From: Gunnar Beutner Date: Wed, 9 May 2012 10:21:56 +0000 (+0200) Subject: Fixed crash in DiscoveryComponent::HasMessagePermission X-Git-Tag: v0.0.1~543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cbf2400c0ae9f04804560c6ee638bf098724be5;p=icinga2 Fixed crash in DiscoveryComponent::HasMessagePermission --- diff --git a/components/discovery/discoverycomponent.cpp b/components/discovery/discoverycomponent.cpp index 7dcb34053..918f30ed1 100644 --- a/components/discovery/discoverycomponent.cpp +++ b/components/discovery/discoverycomponent.cpp @@ -392,6 +392,9 @@ void DiscoveryComponent::SendDiscoveryMessage(string method, string identity, En bool DiscoveryComponent::HasMessagePermission(Dictionary::Ptr roles, string messageType, string message) { + if (!roles) + return false; + ConfigHive::Ptr configHive = GetApplication()->GetConfigHive(); ConfigCollection::Ptr roleCollection = configHive->GetCollection("role");