mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07: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
d5622da576
commit
220fd4a7b8
1 changed files with 2 additions and 2 deletions
|
@ -280,10 +280,10 @@ void QBtSession::processBigRatios() {
|
||||||
const QString hash = h.hash();
|
const QString hash = h.hash();
|
||||||
const qreal ratio = getRealRatio(hash);
|
const qreal ratio = getRealRatio(hash);
|
||||||
qreal ratio_limit = TorrentPersistentData::getRatioLimit(hash);
|
qreal ratio_limit = TorrentPersistentData::getRatioLimit(hash);
|
||||||
if(ratio_limit == TorrentPersistentData::NO_RATIO_LIMIT)
|
|
||||||
continue;
|
|
||||||
if(ratio_limit == TorrentPersistentData::USE_GLOBAL_RATIO)
|
if(ratio_limit == TorrentPersistentData::USE_GLOBAL_RATIO)
|
||||||
ratio_limit = global_ratio_limit;
|
ratio_limit = global_ratio_limit;
|
||||||
|
if(ratio_limit == TorrentPersistentData::NO_RATIO_LIMIT)
|
||||||
|
continue;
|
||||||
qDebug("Ratio: %f (limit: %f)", ratio, ratio_limit);
|
qDebug("Ratio: %f (limit: %f)", ratio, ratio_limit);
|
||||||
Q_ASSERT(ratio_limit >= 0.f);
|
Q_ASSERT(ratio_limit >= 0.f);
|
||||||
if(ratio <= MAX_RATIO && ratio >= ratio_limit) {
|
if(ratio <= MAX_RATIO && ratio >= ratio_limit) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue