Avoid possible crash on exit when the IP filter is enabled

This commit is contained in:
Christophe Dumez 2011-01-03 21:24:57 +00:00
parent e19a5df968
commit b03fa32624
2 changed files with 4 additions and 3 deletions

View file

@ -407,6 +407,8 @@ protected:
ruleCount = parseDATFilterFile(filePath);
}
}
if(abort)
return;
try {
s->set_ip_filter(filter);
emit IPFilterParsed(ruleCount);

View file

@ -161,9 +161,6 @@ QBtSession::~QBtSession() {
#endif
saveSessionState();
saveFastResumeData();
qDebug("Deleting the session");
delete s;
qDebug("Session deleted");
// Delete our objects
if(m_tracker)
delete m_tracker;
@ -178,6 +175,8 @@ QBtSession::~QBtSession() {
// HTTP Server
if(httpServer)
delete httpServer;
qDebug("Deleting the session");
delete s;
qDebug("BTSession destructor OUT");
}