mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-27 07:47:03 -05:00
added safeguard against crash in dir_hierarchy
This commit is contained in:
parent
39a8de9bb9
commit
feecf7c763
@ -647,6 +647,7 @@ uint64_t InternalFileHierarchyStorage::recursUpdateCumulatedSize(const Directory
|
||||
uint64_t local_cumulative_size = 0;
|
||||
|
||||
for(uint32_t i=0;i<d.subfiles.size();++i)
|
||||
if(mNodes[d.subfiles[i]]) // normally not needed, but an extra-security
|
||||
local_cumulative_size += static_cast<FileEntry*>(mNodes[d.subfiles[i]])->file_size;
|
||||
|
||||
for(uint32_t i=0;i<d.subdirs.size();++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user