fixed crash closing YACReaderLibrary after using the server (improved shutdown)

This commit is contained in:
Luis Ángel San Martín 2013-06-13 16:55:55 +02:00
parent dee244455e
commit 2085e16900
2 changed files with 8 additions and 2 deletions

View File

@ -49,5 +49,11 @@ int main( int argc, char ** argv )
/*mw->resize(800,480);
mw->showMaximized();*/
return app.exec();
int ret = app.exec();
//server shutdown
s->stop();
delete s;
return ret;
}

View File

@ -64,7 +64,7 @@ void Startup::start() {
void Startup::stop() {
qDebug("ServiceHelper: Service has been stopped");
// QCoreApplication destroys all objects that have been created in start().
listener->close();
delete listener;
}