diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-04 09:19:39 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-04 09:29:28 +0200 |
commit | f58efb5c2c51e5866d4640036865792b822641f6 (patch) | |
tree | 4316d898c27c3adb1c332544876445ba73bd1eb0 /facetracknoir/main.cpp | |
parent | 27bbb01ff3d49bd37daa9649f5c2320663c46aa4 (diff) | |
parent | 0bf534ff329cabaa61a0dddb8671827577407aba (diff) |
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r-- | facetracknoir/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index c92f6980..6d29e3b5 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -20,7 +20,7 @@ static void add_program_library_path() { char* p = _pgmptr; { - char path[MAX_PATH]; + char path[MAX_PATH+1]; strcpy(path, p); char* ptr = strrchr(path, '\\'); if (ptr) @@ -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; } |