mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
- Fix crash when a torrent contains empty files
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user