mirror of
https://github.com/YACReader/yacreader
synced 2025-07-25 16:34:56 -04:00
fixed crash closing YACReaderLibrary after using the server (improved shutdown)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user