From ce31bef2cfd05d97eb006b62a9f7f6019d27f4a0 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 26 Nov 2009 11:59:40 +0000 Subject: [PATCH] - Make sure the torrent is valid before saving fast resume data --- src/bittorrent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 2b6c80ea6..c3555436c 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1136,6 +1136,7 @@ void Bittorrent::saveFastResumeData() { if (!rd->resume_data) continue; QDir torrentBackup(misc::qBittorrentPath() + "BT_backup"); QTorrentHandle h(rd->handle); + if(!h.is_valid()) continue; // Remove old fastresume file if it exists QFile::remove(torrentBackup.path()+QDir::separator()+ h.hash() + ".fastresume"); QString file = h.hash()+".fastresume";