diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 601eb2eed..4ff8bcc45 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -499,7 +499,7 @@ void scan_dir(path const& dir_path torrent_handle& h = i->second; if (!h.is_valid()) { - handles.erase(i); + handles.erase(i++); continue; } @@ -514,7 +514,7 @@ void scan_dir(path const& dir_path bencode(std::ostream_iterator(out), data); } ses.remove_torrent(h); - handles.erase(i); + handles.erase(i++); } }