fixed extension bug, where 0-pointers would be added the the extension list
This commit is contained in:
@@ -1256,7 +1256,8 @@ namespace libtorrent { namespace detail
|
|||||||
for (extension_list_t::iterator i = m_extensions.begin()
|
for (extension_list_t::iterator i = m_extensions.begin()
|
||||||
, end(m_extensions.end()); i != end; ++i)
|
, end(m_extensions.end()); i != end; ++i)
|
||||||
{
|
{
|
||||||
torrent_ptr->add_extension((*i)(torrent_ptr.get()));
|
boost::shared_ptr<torrent_plugin> tp((*i)(torrent_ptr.get()));
|
||||||
|
if (tp) torrent_ptr->add_extension(tp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1341,7 +1342,8 @@ namespace libtorrent { namespace detail
|
|||||||
for (extension_list_t::iterator i = m_extensions.begin()
|
for (extension_list_t::iterator i = m_extensions.begin()
|
||||||
, end(m_extensions.end()); i != end; ++i)
|
, end(m_extensions.end()); i != end; ++i)
|
||||||
{
|
{
|
||||||
torrent_ptr->add_extension((*i)(torrent_ptr.get()));
|
boost::shared_ptr<torrent_plugin> tp((*i)(torrent_ptr.get()));
|
||||||
|
if (tp) torrent_ptr->add_extension(tp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user