From 399b2eca19ce3019f0f1b9566767c448ebb310cc Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 6 Apr 2012 09:16:43 +0200 Subject: [PATCH] Fixed assertion at program exit. --- base/application.cpp | 4 ++-- base/application.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/application.cpp b/base/application.cpp index c829a3c27..010b95b95 100644 --- a/base/application.cpp +++ b/base/application.cpp @@ -377,11 +377,11 @@ static void application_sigint_handler(int signum) Application::Instance->SigIntHandler(signum); } -int application_main(int argc, char **argv, Application::Ptr instance) +int application_main(int argc, char **argv, Application *instance) { int result; - Application::Instance = instance; + Application::Instance = Application::Ptr(instance); #ifndef _WIN32 struct sigaction sa; diff --git a/base/application.h b/base/application.h index 2806a16e2..8b330b270 100644 --- a/base/application.h +++ b/base/application.h @@ -50,11 +50,11 @@ public: } -int I2_EXPORT application_main(int argc, char **argv, icinga::Application::Ptr instance); +int I2_EXPORT application_main(int argc, char **argv, icinga::Application *instance); #define SET_START_CLASS(klass) \ int main(int argc, char **argv) { \ - shared_ptr instance = make_shared(); \ + klass *instance = new klass(); \ return application_main(argc, argv, instance); \ } -- 2.40.0