mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 03:22:34 -04:00
added a test for QImage::isDetached() in cache to solve the problem of whether a cache image is still used or not
This commit is contained in:
parent
ae3f81a0c3
commit
2ad641d908
1 changed files with 1 additions and 1 deletions
|
@ -472,7 +472,7 @@ const QImage& GxsIdDetails::makeDefaultIcon(const RsGxsId& id)
|
|||
int nb_deleted = 0;
|
||||
|
||||
for(auto it(mDefaultIconCache.begin());it!=mDefaultIconCache.end();)
|
||||
if(it->second.first + ICON_CACHE_STORAGE_TIME < now)
|
||||
if(it->second.first + ICON_CACHE_STORAGE_TIME < now && it->second.second.isDetached())
|
||||
{
|
||||
it = mDefaultIconCache.erase(it);
|
||||
++nb_deleted;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue