mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Fix crash when a torrent contains empty files
This commit is contained in:
parent
925597c43a
commit
d8c27ac8c4
2 changed files with 8 additions and 2 deletions
|
@ -111,7 +111,10 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
|
|||
file["name"] = name;
|
||||
}
|
||||
file["size"] = misc::friendlyUnit((double)fi->size);
|
||||
file["progress"] = fp[i]/(double)fi->size;
|
||||
if(fi->size > 0)
|
||||
file["progress"] = fp[i]/(double)fi->size;
|
||||
else
|
||||
file["progress"] = 1.; // Empty file...
|
||||
file["priority"] = priorities[i];
|
||||
files << file;
|
||||
++i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue