mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- Make sure torrent handle is valid before updating the torrent
This commit is contained in:
parent
1bcb8b1ed8
commit
09d8a4797d
@ -279,6 +279,7 @@ void FinishedTorrents::updateMetadata(QTorrentHandle &h) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FinishedTorrents::updateTorrent(QTorrentHandle h) {
|
void FinishedTorrents::updateTorrent(QTorrentHandle h) {
|
||||||
|
if(!h.is_valid()) return;
|
||||||
QString hash = h.hash();
|
QString hash = h.hash();
|
||||||
int row = getRowFromHash(hash);
|
int row = getRowFromHash(hash);
|
||||||
if(row == -1){
|
if(row == -1){
|
||||||
|
@ -505,6 +505,7 @@ void DownloadingTorrents::updateMetadata(QTorrentHandle &h) {
|
|||||||
// get information from torrent handles and
|
// get information from torrent handles and
|
||||||
// update download list accordingly
|
// update download list accordingly
|
||||||
bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
|
bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
|
||||||
|
if(!h.is_valid()) return false;
|
||||||
bool added = false;
|
bool added = false;
|
||||||
try{
|
try{
|
||||||
QString hash = h.hash();
|
QString hash = h.hash();
|
||||||
|
Loading…
Reference in New Issue
Block a user