From 833f1d8c6a0704262c5b4a2e63ba5d447fd667cd Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 30 Oct 2009 13:11:07 +0000 Subject: [PATCH] - BUGFIX: Fix crash on torrent addition (if libtorrent-rasterbar has debug enabled) --- Changelog | 4 ++++ src/bittorrent.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 00849f2d0..4fde5ff77 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,7 @@ +* Unreleased - Christophe Dumez - v1.5.5 + - BUGFIX: Fixed man page + - BUGFIX: Fix crash on torrent addition (if libtorrent-rasterbar has debug enabled) + * Sun Oct 25 2009 - Christophe Dumez - v1.5.4 - BUGFIX: Updated man page - BUGFIX: Fixed possible crash with torrents containing unicode characters diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 085d0da90..4798a7a28 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -856,7 +856,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{