Fix possible crash when using the new "Auto-shutdown" feature

This commit is contained in:
Christophe Dumez
2010-08-20 09:31:00 +00:00
parent c1fa7f8645
commit e323175275
3 changed files with 8 additions and 6 deletions

View File

@@ -2049,12 +2049,16 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
#if LIBTORRENT_VERSION_MINOR < 15
saveDHTEntry();
#endif
qDebug("Saving session state");
saveSessionState();
qDebug("Saving fast resume data");
saveFastResumeData();
qDebug("Deleting the session");
delete s;
qDebug("Sending computer shutdown signal");
misc::shutdownComputer();
exiting = true;
qApp->exit();
qDebug("Exiting the application");
exit(0);
}
}
}