Browse Source

- Make sure torrent handle is valid before updating the torrent

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
09d8a4797d
  1. 1
      src/FinishedTorrents.cpp
  2. 1
      src/downloadingTorrents.cpp

1
src/FinishedTorrents.cpp

@ -279,6 +279,7 @@ void FinishedTorrents::updateMetadata(QTorrentHandle &h) { @@ -279,6 +279,7 @@ void FinishedTorrents::updateMetadata(QTorrentHandle &h) {
}
void FinishedTorrents::updateTorrent(QTorrentHandle h) {
if(!h.is_valid()) return;
QString hash = h.hash();
int row = getRowFromHash(hash);
if(row == -1){

1
src/downloadingTorrents.cpp

@ -505,6 +505,7 @@ void DownloadingTorrents::updateMetadata(QTorrentHandle &h) { @@ -505,6 +505,7 @@ void DownloadingTorrents::updateMetadata(QTorrentHandle &h) {
// get information from torrent handles and
// update download list accordingly
bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
if(!h.is_valid()) return false;
bool added = false;
try{
QString hash = h.hash();

Loading…
Cancel
Save