From 0b177c27a07344d81cb52806695b2348b6f33b0a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 18 Oct 2022 22:08:27 +0300 Subject: SL-18008 Mac build fix --- indra/newview/llmaterialeditor.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llmaterialeditor.cpp') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 58cebecb23..319f98b816 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1406,13 +1406,21 @@ void LLMaterialEditor::loadLiveMaterial(LLUUID &asset_id) LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor", LLSD(LIVE_MATERIAL_EDITOR_KEY)); me->setTitle(me->getString("material_override_title")); me->setAssetId(asset_id); - me->setFromGLTFMaterial(gGLTFMaterialList.getMaterial(asset_id)); + if (asset_id.notNull()) + { + me->setFromGLTFMaterial(gGLTFMaterialList.getMaterial(asset_id)); + } me->openFloater(); me->setFocus(TRUE); } void LLMaterialEditor::loadFromGLTFMaterial(LLUUID &asset_id) { + if (asset_id.isNull()) + { + LL_WARNS() << "Trying to open material with null id" << LL_ENDL; + return; + } LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor"); me->setTitle(LLTrans::getString("New Material")); me->setHasUnsavedChanges(true); -- cgit v1.2.3