]> granicus.if.org Git - icinga2/commitdiff
Fixed assertion at program exit.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 6 Apr 2012 07:16:43 +0000 (09:16 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 6 Apr 2012 07:16:43 +0000 (09:16 +0200)
base/application.cpp
base/application.h

index c829a3c27d88c7290dc60ab413f2d3b1c47c77b7..010b95b95b88e6d01474ec3f48e5fd530378ae6a 100644 (file)
@@ -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;
index 2806a16e26e9608fbd964392f0a82e443c9d1daf..8b330b2701c547898e0c3b24d937a81b7c3708b0 100644 (file)
@@ -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<klass> instance = make_shared<klass>();              \
+               klass *instance = new klass();          \
                return application_main(argc, argv, instance);                  \
        }