From b9f6bbf09b6d15c7c4b3aa0012ef53cb40ad5a4d Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 3 Jan 2011 21:34:16 +0000 Subject: [PATCH] BUGFIX: Avoid possible crash on exit when the IP filter is enabled (closes #695945) --- Changelog | 1 + src/filterparserthread.h | 1 + src/qtlibtorrent/qbtsession.cpp | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index f2a716cf5..a0e86131b 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,7 @@ - BUGFIX: Some encoding fixes (Windows) - BUGFIX: Display default password on stdout when using nox - BUGFIX: Fix issues when search engines results contain a '|' + - BUGFIX: Avoid possible crash on exit when the IP filter is enabled (closes #695945) * Sat Jan 1 2011 - Christophe Dumez - v2.5.3 - BUGFIX: Fix priority up/down for multiple torrents at the same time (closes #692184) diff --git a/src/filterparserthread.h b/src/filterparserthread.h index a54463068..4447be093 100644 --- a/src/filterparserthread.h +++ b/src/filterparserthread.h @@ -88,6 +88,7 @@ protected: } } } + if(abort) return; s->set_ip_filter(filter); qDebug("IP Filter thread: finished parsing, filter applied"); } diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 772002e5c..ed94c9f61 100644 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -155,9 +155,6 @@ QBtSession::~QBtSession() { #endif saveSessionState(); saveFastResumeData(); - qDebug("Deleting the session"); - delete s; - qDebug("Session deleted"); // Delete our objects if(m_tracker) delete m_tracker; @@ -174,6 +171,8 @@ QBtSession::~QBtSession() { delete httpServer; if(timerETA) delete timerETA; + qDebug("Deleting the session"); + delete s; qDebug("BTSession destructor OUT"); }