summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/main.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-03 09:46:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-03 09:46:29 +0200
commit6c23e1ad43f143ee8b694b907432c5801713a7d5 (patch)
treeca9199e86c47211114c4063a04fc4e1063a74432 /facetracknoir/main.cpp
parent340906d3571ba3c75e67d8457de4129381d5a6b3 (diff)
fix MSVC, now runs
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r--facetracknoir/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
index 2e08c8ba..6d29e3b5 100644
--- a/facetracknoir/main.cpp
+++ b/facetracknoir/main.cpp
@@ -77,13 +77,17 @@ int main(int argc, char** argv)
if (use_profile)
MainWindow::set_profile(profile);
- MainWindow w;
+ auto w = std::make_shared<MainWindow>();
if (use_profile)
- w.startTracker();
+ w->startTracker();
- w.show();
+ w->show();
app.exec();
+ // on MSVC crashes in atexit
+#ifdef _MSC_VER
+ TerminateProcess(GetCurrentProcess(), 0);
+#endif
return 0;
}