mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 17:12:31 -06:00
- Fix crash when a torrent contains empty files
This commit is contained in:
@@ -272,7 +272,10 @@ public:
|
||||
void updateFilesProgress(std::vector<size_type> fp) {
|
||||
for(unsigned int i=0; i<fp.size(); ++i) {
|
||||
TreeItem *item = files_index[i];
|
||||
item->setProgress((float)fp[i]/(float)item->getSize());
|
||||
if(item->getSize() > 0)
|
||||
item->setProgress((float)fp[i]/(float)item->getSize());
|
||||
else
|
||||
item->setProgress(1.); // Empty file...
|
||||
}
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user