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-06-13 22:25:51 +0300 |
commit | 078e8fd99aaeaebef56941235b9331e1730d879a (patch) | |
tree | 011d2bce3df3f583e45bc68c8b0eef32672d79fe /indra | |
parent | 63ef1d1a6a9e92e4d6033b0949c8d730a7deb68c (diff) |
viewer#1750 Crash at LLGLTFMaterial::operator=
Diffstat (limited to 'indra')
-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 5b7243ece2..4cf4db7881 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; + } } } } |