summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-24 19:23:08 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-24 19:23:08 (GMT)
commit8d6d486420fa2ed97979d3855e3051ef022cccb2 (patch)
tree8e18e5ab34e9e6591c0767bdc7515cc4ffd2ef01
parentf45aa5ce9ee21679abbe263ec2df7f0254331f4b (diff)
downloadswift-contrib-8d6d486420fa2ed97979d3855e3051ef022cccb2.zip
swift-contrib-8d6d486420fa2ed97979d3855e3051ef022cccb2.tar.bz2
Avoid segfault on Slimber shutdown.
-rw-r--r--Slimber/MainController.cpp11
-rw-r--r--Slimber/Qt/.gitignore1
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