From 3536577af62cc86695b7e94ef28f323b628f6453 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 22 Nov 2007 21:54:24 +0000 Subject: [PATCH] Added a h.is_valid check --- src/bittorrent.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index e11becb9e..939e06cff 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -842,6 +842,10 @@ void bittorrent::saveFastResumeAndRatioData() { QStringList hashes = getUnfinishedTorrents(); foreach(hash, hashes) { QTorrentHandle h = getTorrentHandle(hash); + if(!h.is_valid()) { + qDebug("/!\\ Error: Invalid handle"); + continue; + } if(h.is_paused()) { // Do not need to save fast resume data for paused torrents continue;