From fe3a6b8b573a7fcf01ce0b1f1051e170e46461eb Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 30 Oct 2009 13:07:13 +0000 Subject: [PATCH] - Fix crash when applying torrent files priorities (if libtorrent-rasterbar has debug enabled) --- src/bittorrent.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 1afcb2a73..f2752ecea 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -858,7 +858,8 @@ void bittorrent::loadFilesPriorities(QTorrentHandle &h) { qDebug("Setting file piority to %d", priority); v.push_back(priority); } - h.prioritize_files(v); + if(v.size() == (unsigned int)h.num_files()) + h.prioritize_files(v); } float bittorrent::getRealRatio(QString hash) const{