MAINT-3474 FIXED crash on startup in LLTextureCache::purgeAllTextures(bool) attempting to delete texture cache
parent
1ae4d45337
commit
2c5e306e14
|
|
@ -119,16 +119,25 @@ bool LLDirIterator::Impl::next(std::string &fname)
|
|||
|
||||
fs::directory_iterator end_itr; // default construction yields past-the-end
|
||||
bool found = false;
|
||||
while (mIter != end_itr && !found)
|
||||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename().string();
|
||||
if (found = boost::regex_match(name, match, mFilterExp))
|
||||
{
|
||||
fname = name;
|
||||
}
|
||||
|
||||
++mIter;
|
||||
// Check if path is a directory.
|
||||
try
|
||||
{
|
||||
while (mIter != end_itr && !found)
|
||||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename().string();
|
||||
if (found = boost::regex_match(name, match, mFilterExp))
|
||||
{
|
||||
fname = name;
|
||||
}
|
||||
|
||||
++mIter;
|
||||
}
|
||||
}
|
||||
catch (const fs::filesystem_error& e)
|
||||
{
|
||||
llwarns << e.what() << llendl;
|
||||
}
|
||||
|
||||
return found;
|
||||
|
|
|
|||
Loading…
Reference in New Issue