1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-04 05:56:02 +00:00

fix: shadowed variable warning in tr_torrentVerify() (#7305)

This commit is contained in:
Yat Ho 2024-12-24 23:26:24 +08:00 committed by GitHub
parent e1fe0c1a73
commit fb36f5d55d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1601,13 +1601,12 @@ void tr_torrentStartNow(tr_torrent* tor)
void tr_torrentVerify(tr_torrent* tor)
{
tor->session->run_in_session_thread(
[session = tor->session, tor_id = tor->id()]()
[tor, session = tor->session, tor_id = tor->id()]()
{
TR_ASSERT(session->am_in_session_thread());
auto const lock = session->unique_lock();
auto* const tor = session->torrents().get(tor_id);
if (tor == nullptr || tor->is_deleting_)
if (tor != session->torrents().get(tor_id) || tor->is_deleting_)
{
return;
}