Fixed possible crash on exit

Cleaned up main() function
This commit is contained in:
Christophe Dumez 2010-07-21 10:40:46 +00:00
parent 864bb8285e
commit 1e21ac3d79
3 changed files with 66 additions and 105 deletions

View file

@ -279,10 +279,7 @@ GUI::~GUI() {
delete BTSession;
// Deleting remaining top level widgets
qDebug("Deleting remaining top level widgets");
foreach (QWidget *win, QApplication::topLevelWidgets()) {
if(win && win != this)
delete win;
}
// May freeze for a few seconds after the next line
// because the Bittorrent session proxy will
// actually be deleted now and destruction