diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-01-25 11:31:22 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-01-25 11:31:22 +0200 |
commit | a661367644cee230637e7ee974f49f6b81f4ff8e (patch) | |
tree | 7e690a28426710c183e1aa31a00fd22ccae47e8a | |
parent | 6b1245aa1eeda1585f36497cdcf1c7e6cd2c3bdb (diff) |
MAINT-7056 Viewer crash when opening many scripts.
-rw-r--r-- | indra/newview/llsyntaxid.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsyntaxid.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9e54c521b5..10a9dee415 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -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; } } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 1360b3e042..caddba5527 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -65,6 +65,7 @@ private: ELLPath mFilePath; LLUUID mSyntaxId; LLSD mKeywordsXml; + bool mInitialized; public: void initialize(); |