Skip to content
Snippets Groups Projects
Commit a6613676 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

MAINT-7056 Viewer crash when opening many scripts.

parent 6b1245aa
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL()
, mCapabilityURL(std::string())
, mFilePath(LL_PATH_APP_SETTINGS)
, mSyntaxId(LLUUID())
, mInitialized(false)
{
loadDefaultKeywordsIntoLLSD();
mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this));
......@@ -179,6 +180,7 @@ void LLSyntaxIdLSL::cacheFile(const std::string &fileSpec, const LLSD& content_r
//-----------------------------------------------------------------------------
void LLSyntaxIdLSL::initialize()
{
if(mInitialized) return;
if (mSyntaxId.isNull())
{
loadDefaultKeywordsIntoLLSD();
......@@ -213,6 +215,7 @@ void LLSyntaxIdLSL::initialize()
LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL;
loadDefaultKeywordsIntoLLSD();
}
mInitialized = true;
}
//-----------------------------------------------------------------------------
......@@ -303,6 +306,7 @@ void LLSyntaxIdLSL::handleRegionChanged()
{
buildFullFileSpec();
fetchKeywordsFile(mFullFileSpec);
mInitialized = false;
}
}
......
......@@ -65,6 +65,7 @@ class LLSyntaxIdLSL : public LLSingleton<LLSyntaxIdLSL>
ELLPath mFilePath;
LLUUID mSyntaxId;
LLSD mKeywordsXml;
bool mInitialized;
public:
void initialize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment