diff --git a/src/Layers/xrRender/DetailManager_CACHE.cpp b/src/Layers/xrRender/DetailManager_CACHE.cpp index 1ab7a06632a..d3fab4b11fe 100644 --- a/src/Layers/xrRender/DetailManager_CACHE.cpp +++ b/src/Layers/xrRender/DetailManager_CACHE.cpp @@ -211,7 +211,7 @@ void CDetailManager::cache_Update(int v_x, int v_z, Fvector& view) } } - // We sort indexes and process them in reverse order to erase correctly from cache_task + // Because indexes become invalid after an erase, sort them and process in the reverse order to erase everything correctly std::sort(bestIndexes, bestIndexes + dm_max_decompress); for (int i = dm_max_decompress - 1; i >= 0; --i)