From daff6dce4c8adc7a619d7c703f15837b0ea2e162 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 23 Mar 2010 21:35:47 +0000 Subject: [PATCH] Fix possible crash when deleting a torrent just after pausing it --- src/bittorrent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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