added assert in torrent::state_updated() to make sure it's not called from the constructor
This commit is contained in:
parent
8d754b9674
commit
1bd4d1633c
|
@ -8096,6 +8096,12 @@ namespace libtorrent
|
||||||
|
|
||||||
void torrent::state_updated()
|
void torrent::state_updated()
|
||||||
{
|
{
|
||||||
|
// if this fails, this function is probably called
|
||||||
|
// from within the torrent constructor, which it
|
||||||
|
// shouldn't be. Whichever function ends up calling
|
||||||
|
// this should probably be moved to torrent::start()
|
||||||
|
TORRENT_ASSERT(shared_from_this());
|
||||||
|
|
||||||
// we're either not subscribing to this torrent, or
|
// we're either not subscribing to this torrent, or
|
||||||
// it has already been updated this round, no need to
|
// it has already been updated this round, no need to
|
||||||
// add it to the list twice
|
// add it to the list twice
|
||||||
|
|
Loading…
Reference in New Issue