Fix loading of texture precache list.

This commit is contained in:
Shyotl
2020-05-16 22:45:50 -05:00
parent 5e21037230
commit 8817bf53e3

View File

@@ -289,11 +289,17 @@ void LLViewerTextureList::shutdown()
iter != mImageList.end(); ++iter) iter != mImageList.end(); ++iter)
{ {
LLViewerFetchedTexture* image = *iter; LLViewerFetchedTexture* image = *iter;
if (!(image->getType() == LLViewerTexture::FETCHED_TEXTURE || image->getType() == LLViewerTexture::LOD_TEXTURE) ||
image->getFTType() != FTT_DEFAULT ||
image->getID() == IMG_DEFAULT)
{
continue;
}
if (!image->hasGLTexture() || if (!image->hasGLTexture() ||
!image->getUseDiscard() || !image->getUseDiscard() ||
image->needsAux() || image->needsAux()// ||
image->getTargetHost() != LLHost::invalid || //image->getTargetHost() != LLHost::invalid ||
!image->getUrl().empty() //!image->getUrl().empty()
) )
{ {
continue; // avoid UI, baked, and other special images continue; // avoid UI, baked, and other special images
@@ -328,7 +334,7 @@ void LLViewerTextureList::shutdown()
if (count > 0 && !gDirUtilp->getLindenUserDir(true).empty()) if (count > 0 && !gDirUtilp->getLindenUserDir(true).empty())
{ {
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name()); std::string filename = get_texture_list_name();
llofstream file; llofstream file;
file.open(filename); file.open(filename);
LLSDSerialize::toPrettyXML(imagelist, file); LLSDSerialize::toPrettyXML(imagelist, file);