1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-03-10 04:11:16 +00:00

Fix possible infinite loop in qBtSession constructor (when Web UI is enabled)

This commit is contained in:
Christophe Dumez 2010-11-21 19:46:06 +00:00
parent d05c725253
commit d8af5d681c
2 changed files with 2 additions and 1 deletions

View File

@ -331,6 +331,7 @@ MainWindow::~MainWindow() {
// Delete BTSession objects
qDebug("Deleting BTSession");
QBtSession::drop();
BTSession = 0;
// May freeze for a few seconds after the next line
// because the Bittorrent session proxy will
// actually be deleted now and destruction

View File

@ -139,7 +139,7 @@ QBtSession::QBtSession()
#endif
connect(m_scanFolders, SIGNAL(torrentsAdded(QStringList&)), this, SLOT(addTorrentsFromScanFolder(QStringList&)));
// Apply user settings to Bittorrent session
configureSession();
QTimer::singleShot(0, this, SLOT(configureSession()));
qDebug("* BTSession constructed");
}