diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 2e2909d55..54f90a9ff 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -238,7 +238,7 @@ namespace libtorrent // event refers to a disk buffer it will try to free it, but the // buffer pool won't exist anymore, and crash. This prevents that. boost::shared_ptr work = - boost::make_shared(m_ios); + boost::make_shared(boost::ref(m_ios)); // the magic number 3 is also used in add_job() // every 4:th thread is a hasher thread