mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
Fixed crash on exit while downloading from webseed (#4451)
This commit is contained in:
parent
14a3d01e45
commit
3cee8bae36
1 changed files with 3 additions and 3 deletions
|
@ -452,9 +452,6 @@ void onPartialDataFetched(tr_web::FetchResponse const& web_response)
|
|||
bool const success = status == 206;
|
||||
|
||||
auto* const task = static_cast<tr_webseed_task*>(vtask);
|
||||
auto* const webseed = task->webseed;
|
||||
|
||||
webseed->connection_limiter.taskFinished(success);
|
||||
|
||||
if (task->dead)
|
||||
{
|
||||
|
@ -462,6 +459,9 @@ void onPartialDataFetched(tr_web::FetchResponse const& web_response)
|
|||
return;
|
||||
}
|
||||
|
||||
auto* const webseed = task->webseed;
|
||||
webseed->connection_limiter.taskFinished(success);
|
||||
|
||||
if (auto const* const tor = webseed->getTorrent(); tor == nullptr)
|
||||
{
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue