diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-18 22:08:27 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-10-18 22:08:27 +0300 | 
| commit | 0b177c27a07344d81cb52806695b2348b6f33b0a (patch) | |
| tree | 3871e0938efe631addd33407fc6f71916632ac2a /indra | |
| parent | 7be33594eaab6b9c0da863778bbdacdb8cbe7838 (diff) | |
SL-18008 Mac build fix
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llmaterialeditor.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llmaterialeditor.h | 4 | ||||
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 2 | 
3 files changed, 12 insertions, 4 deletions
| 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); diff --git a/indra/newview/llmaterialeditor.h b/indra/newview/llmaterialeditor.h index 8945e113a4..3b2648cba5 100644 --- a/indra/newview/llmaterialeditor.h +++ b/indra/newview/llmaterialeditor.h @@ -103,9 +103,9 @@ public:      // will promt to select specific one      static void loadMaterialFromFile(const std::string& filename, S32 index = -1); -    static void LLMaterialEditor::loadLiveMaterial(LLUUID &asset_id); +    static void loadLiveMaterial(LLUUID &asset_id); -    static void LLMaterialEditor::loadFromGLTFMaterial(LLUUID &asset_id); +    static void loadFromGLTFMaterial(LLUUID &asset_id);      static void onLoadComplete(const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ffa104230e..4d04c6c85e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2812,7 +2812,7 @@ bool enable_object_save_gltf_material()      LLSelectedTEGetmatIdAndPermissions func;      LLUUID mat_id;      LLSelectMgr::getInstance()->getSelection()->getSelectedTEValue(&func, mat_id); -    return func.mCanCopy; +    return func.mCanCopy && mat_id.notNull();  }  bool enable_object_open() | 
