Commit f7b08dd6 authored by Joris Guisson's avatar Joris Guisson
Browse files

Backport rev 1021633 from trunk

svn path=/branches/stable/extragear-kde4/network/ktorrent/; revision=1026872
parent 29075ac9
Changes in 3.2.4 :
- Improve flexibility of IP blocklist parsing to support more formats
- Fix bug in TorrentFileListModel causing wrong checkstate to be shown
- Fix very rare crash caused by 0 pointer (206689)
Changes in 3.2.3 :
- Make sure View gets focus back when you are finished editing the name of a torrent
......
......@@ -635,6 +635,13 @@ namespace bt
}
Uint8* data = piece->data();
if (!data) // this should not happen but just in case
{
if (!piece->inUse())
clearPiece(piece);
return;
}
Chunk* c = piece->parentChunk();
QList<Uint32> tflist;
tor.calcChunkPos(c->getIndex(),tflist);
......
......@@ -198,7 +198,8 @@ namespace bt
if (!piece->mapped())
{
Uint64 off = piece->parentChunk()->getIndex() * tor.getChunkSize() + piece->offset();
fd->write(piece->data(),piece->length(),off);
if (piece->data())
fd->write(piece->data(),piece->length(),off);
}
if (!piece->inUse()) // get rid of piece if we can
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment