diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-06-13 18:37:28 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-08-09 22:55:08 +0300 |
commit | 9a8b2186e745f77e7f62c4cae6c620d8275c166e (patch) | |
tree | 9389a210283bd48ea7cf1adcee223b9be5e3a26e /indra/newview | |
parent | 04f95e78e38a682d4933ead0403e78507cbe79a6 (diff) |
viewer#1750 Crash at LLGLTFMaterial::operator=
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lllocalbitmaps.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 6ab5e05b7d..49abc7ab7d 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -671,15 +671,16 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id) if (override_mat) { // do not create a new material, reuse existing pointer - LLFetchedGLTFMaterial* render_mat = (LLFetchedGLTFMaterial*)entry->getGLTFRenderMaterial(); + LLFetchedGLTFMaterial* render_mat = dynamic_cast<LLFetchedGLTFMaterial*>(entry->getGLTFRenderMaterial()); if (render_mat) { - llassert(dynamic_cast<LLFetchedGLTFMaterial*>(entry->getGLTFRenderMaterial()) != nullptr); - { - *render_mat = *fetched_mat; - } + *render_mat = *fetched_mat; render_mat->applyOverride(*override_mat); } + else + { + LL_WARNS_ONCE() << "Failed to apply local material override, render material not found" << LL_ENDL; + } } } } |