From b0a3b2545be4bf501290fbc3b53b4faacb769c11 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 24 Jul 2010 17:10:45 +0000 Subject: [PATCH] fixed bug in torrent_handle::write_resume_data since the session mutex was removed --- src/torrent_handle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/torrent_handle.cpp b/src/torrent_handle.cpp index 87868855d..15a7a41c4 100644 --- a/src/torrent_handle.cpp +++ b/src/torrent_handle.cpp @@ -728,6 +728,7 @@ namespace libtorrent entry ret(entry::dictionary_t); TORRENT_SYNC_CALL1(write_resume_data, boost::ref(ret)); + t = m_torrent.lock(); if (t) { bool done = false; @@ -737,6 +738,7 @@ namespace libtorrent ses.m_io_service.post(boost::bind(&fun_wrap, &done, &ses.cond , &ses.mut, boost::function(boost::bind( &piece_manager::write_resume_data, &t->filesystem(), boost::ref(ret))))); + t.reset(); do { ses.cond.wait(l); } while(!done); }