- BUGFIX: Catching invalid_handle exception to avoid rare crashes

This commit is contained in:
Christophe Dumez
2009-08-17 06:41:32 +00:00
parent 265f1e661a
commit 4d4d313a8f
4 changed files with 5 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.4.1
- BUGFIX: Fix problems when changing save path (if using temporary download folder)
- BUGFIX: Display real save path instead of the temporary one in torrent properties
- BUGFIX: Catching invalid_handle exception to avoid rare crashes
* Thu Aug 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
- FEATURE: Display swarm information in lists

View File

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

View File

@@ -1420,6 +1420,7 @@ void GUI::updateLists(bool force) {
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(!h.is_valid()) continue;
try {
if(h.is_seed()) {
// Update in finished list
finishedTorrentTab->updateTorrent(h);
@@ -1431,6 +1432,7 @@ void GUI::updateLists(bool force) {
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished");
}
}
} catch(invalid_handle) {}
}
}
if(displaySpeedInTitle) {

View File

@@ -482,6 +482,7 @@ QStringList DownloadingTorrents::getSelectedTorrents(bool only_one) const{
// 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();