mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-08-26 13:42:37 +00:00
Handle exceptions in readAlerts()
This commit is contained in:
parent
e73bff817c
commit
81b0a7f785
@ -2159,6 +2159,7 @@ void QBtSession::readAlerts() {
|
||||
// look at session alerts and display some infos
|
||||
std::auto_ptr<alert> a = s->pop_alert();
|
||||
while (a.get()) {
|
||||
try {
|
||||
if (torrent_finished_alert* p = dynamic_cast<torrent_finished_alert*>(a.get())) {
|
||||
QTorrentHandle h(p->handle);
|
||||
if (h.is_valid()) {
|
||||
@ -2541,6 +2542,10 @@ void QBtSession::readAlerts() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
qWarning() << "Caught exception in readAlerts(): " << e.what();
|
||||
}
|
||||
|
||||
a = s->pop_alert();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user