From: Gunnar Beutner Date: Thu, 12 Sep 2013 13:22:21 +0000 (+0200) Subject: Fix crash in ClusterComponent::CheckAuthorityHandler. X-Git-Tag: v0.0.3~537 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5cdf08c37128ca40d63c95c1c4fda1ead23d2a34;p=icinga2 Fix crash in ClusterComponent::CheckAuthorityHandler. --- diff --git a/components/cluster/clustercomponent.cpp b/components/cluster/clustercomponent.cpp index 97f8aeeae..bed6ca409 100644 --- a/components/cluster/clustercomponent.cpp +++ b/components/cluster/clustercomponent.cpp @@ -1153,6 +1153,9 @@ void ClusterComponent::CheckAuthorityHandler(const DynamicObject::Ptr& object, c endpoints.push_back(endpoint->GetName()); } + if (endpoints.empty()) + return; + std::sort(endpoints.begin(), endpoints.end()); String key = object->GetType()->GetName() + "\t" + object->GetName();