diff --git a/src/qtlibtorrent/qbtsession.cpp b/src/qtlibtorrent/qbtsession.cpp index 9eac9eaa8..949a2614f 100755 --- a/src/qtlibtorrent/qbtsession.cpp +++ b/src/qtlibtorrent/qbtsession.cpp @@ -402,7 +402,8 @@ void QBtSession::configureSession() { sessionSettings.announce_to_all_trackers = announce_to_all; sessionSettings.announce_to_all_tiers = announce_to_all; sessionSettings.auto_scrape_min_interval = 900; // 15 minutes - sessionSettings.cache_size = pref.diskCacheSize() ? pref.diskCacheSize() * 64 : -1; + int cache_size = pref.diskCacheSize(); + sessionSettings.cache_size = cache_size ? pref.diskCacheSize() * 64 : -1; qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB"; // Disable OS cache to avoid memory problems (uTorrent behavior) #ifdef Q_WS_WIN