mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
Don't trip on absence of global ratio in QBtSession::processBigRatios()
QBtSession::processBigRatios() must fetch the global ratio, if applicable, before checking for NO_RATIO_LIMIT. LP: #835217
This commit is contained in:
parent
901326c004
commit
91af418254
@ -272,10 +272,10 @@ void QBtSession::processBigRatios() {
|
||||
const QString hash = h.hash();
|
||||
const qreal ratio = getRealRatio(hash);
|
||||
qreal ratio_limit = TorrentPersistentData::getRatioLimit(hash);
|
||||
if (ratio_limit == TorrentPersistentData::NO_RATIO_LIMIT)
|
||||
continue;
|
||||
if (ratio_limit == TorrentPersistentData::USE_GLOBAL_RATIO)
|
||||
ratio_limit = global_ratio_limit;
|
||||
if (ratio_limit == TorrentPersistentData::NO_RATIO_LIMIT)
|
||||
continue;
|
||||
qDebug("Ratio: %f (limit: %f)", ratio, ratio_limit);
|
||||
Q_ASSERT(ratio_limit >= 0.f);
|
||||
if (ratio <= MAX_RATIO && ratio >= ratio_limit) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user