mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 05:53:10 +02:00
Don't use invalidated iterators
This commit is contained in:
parent
6a12425a2a
commit
dfc3e5d488
1 changed files with 6 additions and 3 deletions
|
@ -64,9 +64,12 @@ void ResourceCache::clearATPAssets() {
|
|||
}
|
||||
{
|
||||
QWriteLocker locker(&_resourcesToBeGottenLock);
|
||||
for (auto& url : _resourcesToBeGotten) {
|
||||
if (url.scheme() == URL_SCHEME_ATP) {
|
||||
_resourcesToBeGotten.removeAll(url);
|
||||
auto it = _resourcesToBeGotten.begin();
|
||||
while (it != _resourcesToBeGotten.end()) {
|
||||
if (it->scheme() == URL_SCHEME_ATP) {
|
||||
it = _resourcesToBeGotten.erase(it);
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue