From 9bf673210f9aac7fff79ac9f1e850a48934b3eeb Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 4 Dec 2010 13:58:36 +0000 Subject: [PATCH] Code clean up --- src/mainwindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4407c4c88..4b64a19d8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -269,10 +269,8 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo void MainWindow::deleteBTSession() { guiUpdater->stop(); status_bar->stopTimer(); - if(BTSession) { - delete BTSession; - BTSession = 0; - } + QBtSession::drop(); + BTSession = 0; QTimer::singleShot(0, this, SLOT(close())); }