[icinga-checkins] icinga.org: icinga2/master: Fix crash in Checkable::OnAllConfigLoaded

git at icinga.org git at icinga.org
Thu Nov 10 13:43:11 CET 2016


Module: icinga2
Branch: master
Commit: 06e4b4e9da73bb654f0a91bc5257f4c8e118abb0
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=06e4b4e9da73bb654f0a91bc5257f4c8e118abb0

Author: Gunnar Beutner <gunnar.beutner at icinga.com>
Date:   Thu Nov 10 13:42:50 2016 +0100

Fix crash in Checkable::OnAllConfigLoaded

fixes #13103

---

 lib/icinga/checkable.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp
index 19b65ed..1ddb962 100644
--- a/lib/icinga/checkable.cpp
+++ b/lib/icinga/checkable.cpp
@@ -63,7 +63,7 @@ void Checkable::OnAllConfigLoaded(void)
 
 		Zone::Ptr cmdZone = endpoint->GetZone();
 
-		if (cmdZone != checkableZone && cmdZone->GetParent() != checkableZone) {
+		if (checkableZone && cmdZone != checkableZone && cmdZone->GetParent() != checkableZone) {
 			BOOST_THROW_EXCEPTION(ValidationError(this, boost::assign::list_of("command_endpoint"),
 			    "Command endpoint must be in zone '" + checkableZone->GetName() + "' or in a direct child zone thereof."));
 		}



More information about the icinga-checkins mailing list