[icinga-checkins] icinga.org: icinga2/mfriedrich/config: Fix crash when application config item is missing.

git at icinga.org git at icinga.org
Mon Apr 8 11:20:14 CEST 2013


Module: icinga2
Branch: mfriedrich/config
Commit: 23b75fd30d483a5530e4bb5763a90b377bba39cc
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=23b75fd30d483a5530e4bb5763a90b377bba39cc

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Apr  8 10:02:06 2013 +0200

Fix crash when application config item is missing.

---

 lib/base/application.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/base/application.cpp b/lib/base/application.cpp
index 547652c..b3872e7 100644
--- a/lib/base/application.cpp
+++ b/lib/base/application.cpp
@@ -102,6 +102,9 @@ Application::~Application(void)
  */
 Application::Ptr Application::GetInstance(void)
 {
+	if (!m_Instance)
+		return Application::Ptr();
+
 	return m_Instance->GetSelf();
 }
 





More information about the icinga-checkins mailing list