]> granicus.if.org Git - icinga2/commitdiff
Fix crash in ClusterComponent::CheckAuthorityHandler.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 12 Sep 2013 13:22:21 +0000 (15:22 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 12 Sep 2013 13:22:21 +0000 (15:22 +0200)
components/cluster/clustercomponent.cpp

index 97f8aeeaedf3547cce86d636273edd547d7a06bf..bed6ca409b9da134b02c6bc0235ae34bea1321d7 100644 (file)
@@ -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();