From d775f9b63dd842613abe254fd80451fb318502c1 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Aug 2017 18:45:45 +0300 Subject: MAINT-7732 FIXED Crash in LLLiveLSLEditor::loadScriptText --- indra/newview/llpreviewscript.cpp | 10 +++++++++- indra/newview/llpreviewscript.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'indra') 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(); -- cgit v1.2.3