mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
fix: crash regression in tr_peerMgr::make_new_peer_connections()
This commit is contained in:
parent
ec54e7f11e
commit
82f08420fd
1 changed files with 6 additions and 4 deletions
|
@ -2533,11 +2533,13 @@ void tr_peerMgr::make_new_peer_connections()
|
|||
for (size_t i = 0; i < n_this_pass; ++i)
|
||||
{
|
||||
auto const& [tor_id, sock_addr] = peers[i];
|
||||
auto* const tor = session->torrents().get(tor_id);
|
||||
auto* const atom = tor->swarm->get_existing_atom(sock_addr);
|
||||
if (tor != nullptr && atom != nullptr)
|
||||
|
||||
if (auto* const tor = session->torrents().get(tor_id); tor != nullptr)
|
||||
{
|
||||
initiateConnection(this, tor->swarm, *atom);
|
||||
if (auto* const atom = tor->swarm->get_existing_atom(sock_addr); atom != nullptr)
|
||||
{
|
||||
initiateConnection(this, tor->swarm, *atom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue