From 92661b2a717cb6c52eae56a0112e2aaa1425306b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 1 Nov 2011 21:08:21 +0000 Subject: [PATCH] fix iterator issue in client_test --- examples/client_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 337bf3e5d..3631b0dca 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -1592,10 +1592,10 @@ int main(int argc, char* argv[]) , boost::bind(&handles_t::value_type::second, _1) == h); if (i != files.end()) { - files.erase(i); error_code ec; remove(combine_path(monitor_dir, i->first), ec); if (ec) printf("failed to delete .torrent file: %s\n", ec.message().c_str()); + files.erase(i); } if (h.is_valid()) ses.remove_torrent(h, session::delete_files);