From 60d0c333ff60e0c69c2060076e5e9e621320c384 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Wed, 14 Feb 2007 02:05:46 +0000 Subject: [PATCH] avoid some calculations of piece availability if there are no peers --- macosx/Torrent.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 0e5e78d3c..540d01ce9 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -1348,7 +1348,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 have = MAX_PIECES; avail = 0; } - else if (![self isActive]) + else if (![self isActive] || [self totalPeers] <= 0) { have = rintf((float)MAX_PIECES * [self progress]); avail = 0;