mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 13:58:51 +03:00
- Fix crash when pausing a torrent if queueing system is disabled
This commit is contained in:
parent
360c8500bb
commit
88ea548eaf
1 changed files with 9 additions and 7 deletions
|
@ -750,13 +750,15 @@ bool bittorrent::pauseTorrent(QString hash) {
|
|||
// Remove it from TorrentsStartTime hash table
|
||||
TorrentsStartTime.remove(hash);
|
||||
TorrentsStartData.remove(hash);
|
||||
// Remove it from queued list if present
|
||||
if(queuedDownloads->contains(hash))
|
||||
queuedDownloads->removeAll(hash);
|
||||
if(queuedUploads->contains(hash))
|
||||
queuedUploads->removeAll(hash);
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued"))
|
||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued");
|
||||
if(queueingEnabled) {
|
||||
// Remove it from queued list if present
|
||||
if(queuedDownloads->contains(hash))
|
||||
queuedDownloads->removeAll(hash);
|
||||
if(queuedUploads->contains(hash))
|
||||
queuedUploads->removeAll(hash);
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued"))
|
||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".queued");
|
||||
}
|
||||
return change;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue