Fix for seg fault on Linux exit.

This commit is contained in:
Andrzej Kapolka 2013-12-09 13:32:02 -08:00
parent 3d84b72e22
commit 8f633f87e9
2 changed files with 9 additions and 3 deletions

View file

@ -233,6 +233,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
}
Application::~Application() {
// make sure we don't call the idle timer any more
delete idleTimer;
// ask the audio thread to quit and wait until it is done
_audio.thread()->quit();
_audio.thread()->wait();

View file

@ -29,10 +29,13 @@ int main(int argc, const char * argv[]) {
QCoreApplication::addLibraryPath(QT_RELEASE_PLUGIN_PATH);
#endif
Application app(argc, const_cast<char**>(argv), startup_time);
int exitCode;
{
Application app(argc, const_cast<char**>(argv), startup_time);
qDebug( "Created QT Application.\n" );
int exitCode = app.exec();
qDebug( "Created QT Application.\n" );
exitCode = app.exec();
}
qDebug("Normal exit.\n");
return exitCode;
}