diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-12-11 21:05:00 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-12-12 18:13:24 +0200 |
| commit | f4eec813a3043e2277ae62da6a829c65887d0785 (patch) | |
| tree | ec8165bd2c685e21660ff3a2e7bfd55c235945c5 | |
| parent | 44e41779028e0a5574c5382b1b56455f8fb612f3 (diff) | |
#5148 Crash cleaning LLVOCache
| -rw-r--r-- | indra/newview/llappviewer.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 569fd30b21..b8aac829fe 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4510,7 +4510,19 @@ void LLAppViewer::purgeCacheImmediate() { LL_INFOS("AppCache") << "Purging Object Cache and Texture Cache immediately..." << LL_ENDL; LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE, false); - LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true); + if (LLVOCache::instanceExists()) + { + LLVOCache::getInstance()->removeCache(LL_PATH_CACHE, true); + } + else if (!mSecondInstance) + { + // LLVOCache requires parameters to be initialized, if it's not there, try manually + std::string mask = "*"; + std::string cache_dir = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, "objectcache"); + LL_INFOS() << "Removing cache at " << cache_dir << LL_ENDL; + gDirUtilp->deleteFilesInDir(cache_dir, mask); //delete all files + LLFile::rmdir(cache_dir); + } } std::string LLAppViewer::getSecondLifeTitle() const |
