summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-08-23 18:45:45 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-08-23 18:45:45 +0300
commitd775f9b63dd842613abe254fd80451fb318502c1 (patch)
tree00366d97322c73bba6b72966fd77fd149fb0139e
parentd290f2c512a3bdbb526fc0fc00e17a9c8bdc0693 (diff)
MAINT-7732 FIXED Crash in LLLiveLSLEditor::loadScriptText
-rw-r--r--indra/newview/llpreviewscript.cpp10
-rw-r--r--indra/newview/llpreviewscript.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index b7fea4e982..3c5e2544bb 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -584,6 +584,14 @@ void LLScriptEdCore::setScriptText(const std::string& text, BOOL is_valid)
}
}
+void LLScriptEdCore::makeEditorPristine()
+{
+ if (mEditor)
+ {
+ mEditor->makePristine();
+ }
+}
+
bool LLScriptEdCore::loadScriptText(const std::string& filename)
{
if (filename.empty())
@@ -2026,7 +2034,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
buffer[file_length] = '\0';
mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
- mScriptEd->mEditor->makePristine();
+ mScriptEd->makeEditorPristine();
mScriptEd->setScriptName(getItem()->getName());
}
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 6b31125641..8178bb9325 100644
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -90,6 +90,7 @@ public:
bool canLoadOrSaveToFile( void* userdata );
void setScriptText(const std::string& text, BOOL is_valid);
+ void makeEditorPristine();
bool loadScriptText(const std::string& filename);
bool writeToFile(const std::string& filename);
void sync();