MAINT-7732 Crash in LLLiveLSLEditor::loadScriptText(..)

master
Mnikolenko Productengine 2018-01-16 16:08:08 +02:00
parent 3229b34a07
commit df45a4ef14
1 changed files with 9 additions and 1 deletions

View File

@ -2041,7 +2041,15 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType
mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE);
mScriptEd->makeEditorPristine();
mScriptEd->setScriptName(getItem()->getName());
std::string script_name = DEFAULT_SCRIPT_NAME;
const LLInventoryItem* inv_item = getItem();
if(inv_item)
{
script_name = inv_item->getName();
}
mScriptEd->setScriptName(script_name);
}