mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- catching invalid_handle exception to avoid rare crashes
This commit is contained in:
parent
09d8a4797d
commit
7e71de558a
@ -1431,6 +1431,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||||||
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
||||||
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
||||||
if(!h.is_valid()) continue;
|
if(!h.is_valid()) continue;
|
||||||
|
try {
|
||||||
if(h.is_seed()) {
|
if(h.is_seed()) {
|
||||||
// Update in finished list
|
// Update in finished list
|
||||||
finishedTorrentTab->updateTorrent(h);
|
finishedTorrentTab->updateTorrent(h);
|
||||||
@ -1442,6 +1443,9 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
|||||||
TorrentPersistentData::saveSeedStatus(h);
|
TorrentPersistentData::saveSeedStatus(h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch(invalid_handle e) {
|
||||||
|
qDebug("Caught Invalid handle exception, lucky us.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(displaySpeedInTitle) {
|
if(displaySpeedInTitle) {
|
||||||
|
Loading…
Reference in New Issue
Block a user