avoid some calculations of piece availability if there are no peers

This commit is contained in:
Mitchell Livingston 2007-02-14 02:05:46 +00:00
parent 7d569e7981
commit 60d0c333ff
1 changed files with 1 additions and 1 deletions

View File

@ -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;