Fix issue with zero size cache.

PiperOrigin-RevId: 819773517
Change-Id: Iff1523e17ffbd1dff02bee71db896c64bd8b565c
This commit is contained in:
Kyle Bayes
2025-10-15 08:44:48 -07:00
committed by Copybara-Service
parent 5715cebbb9
commit 8cbfc42767
3 changed files with 40 additions and 6 deletions
+1 -1
View File
@@ -116,10 +116,10 @@ bool mjCCache::PopulateData(const std::string& id, const mjResource* resource, m
}
mjCAsset* asset = &(it->second);
asset->IncrementAccess();
// update priority queue
entries_.erase(asset);
asset->IncrementAccess();
entries_.insert(asset);
return asset->PopulateData(fn);