From 77c29f48cb900dfe4496c72d490541c7b5248b6a Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 23 Mar 2010 21:42:33 +0000 Subject: [PATCH] Fix possible crash when deleting a torrent just after pausing it --- Changelog | 3 +++ src/bittorrent.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index df9603a24..f73253250 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +* Unreleased - Christophe Dumez - v2.2.3 + - BUGFIX: Fix possible crash when deleting a torrent just after pausing it + * Mon Mar 22 2010 - Christophe Dumez - v2.2.2 - FEATURE: DHT port can be set from Web UI - BUGFIX: Fix possible crash with folder scanning diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 972119381..c85818503 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -2002,7 +2002,9 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { } #endif else if (torrent_paused_alert* p = dynamic_cast(a.get())) { - p->handle.save_resume_data(); + if(p->handle.is_valid()) { + p->handle.save_resume_data(); + } } else if (tracker_error_alert* p = dynamic_cast(a.get())) { // Level: fatal