diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-04-24 19:23:08 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-04-24 19:23:08 (GMT) |
commit | 8d6d486420fa2ed97979d3855e3051ef022cccb2 (patch) | |
tree | 8e18e5ab34e9e6591c0767bdc7515cc4ffd2ef01 | |
parent | f45aa5ce9ee21679abbe263ec2df7f0254331f4b (diff) | |
download | swift-contrib-8d6d486420fa2ed97979d3855e3051ef022cccb2.zip swift-contrib-8d6d486420fa2ed97979d3855e3051ef022cccb2.tar.bz2 |
Avoid segfault on Slimber shutdown.
-rw-r--r-- | Slimber/MainController.cpp | 11 | ||||
-rw-r--r-- | Slimber/Qt/.gitignore | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Slimber/MainController.cpp b/Slimber/MainController.cpp index e5def24..3699498 100644 --- a/Slimber/MainController.cpp +++ b/Slimber/MainController.cpp @@ -23,10 +23,6 @@ using namespace Swift; MainController::MainController(Menulet* menulet) : menulet(menulet) { - menuletController = new MenuletController(menulet); - menuletController->onRestartRequested.connect(boost::bind( - &MainController::handleRestartRequested, this)); - dnsSDQuerier = PlatformDNSSDQuerierFactory().createQuerier(); assert(dnsSDQuerier); @@ -47,12 +43,17 @@ MainController::MainController(Menulet* menulet) : menulet(menulet) { server->onSelfConnected.connect( boost::bind(&MainController::handleSelfConnected, this, _1)); + menuletController = new MenuletController(menulet); + menuletController->onRestartRequested.connect(boost::bind( + &MainController::handleRestartRequested, this)); + + start(); } MainController::~MainController() { - delete menuletController; delete server; + delete menuletController; delete vCardCollection; linkLocalServiceBrowser->stop(); delete linkLocalServiceBrowser; diff --git a/Slimber/Qt/.gitignore b/Slimber/Qt/.gitignore new file mode 100644 index 0000000..83750b9 --- /dev/null +++ b/Slimber/Qt/.gitignore @@ -0,0 +1 @@ +BuildVersion.h |