diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-28 11:50:32 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-28 11:50:32 -0500 |
commit | e72d0161bb086799d445b54e0e73c2dc13e4643a (patch) | |
tree | 39cb2533381ce2279a827976c3ced4dae4184a43 | |
parent | 2752ab3b6212266047bd6b63b076d5be9b2a2d64 (diff) |
SL-18493 Fix for assert when setting override before material has arrived
-rw-r--r-- | indra/newview/llviewerobject.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 251af1b46e..e3618645e3 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5361,6 +5361,13 @@ S32 LLViewerObject::setTEGLTFMaterialOverride(U8 te, LLGLTFMaterial* override_ma LLFetchedGLTFMaterial* src_mat = (LLFetchedGLTFMaterial*) tep->getGLTFMaterial(); + if (!src_mat) + { // we can get into this state if an override has arrived before the viewer has + // received or handled an update, return TEM_CHANGE_NONE to signal to LLGLTFMaterialList that it + // should queue the update for later + return retval; + } + tep->setGLTFMaterialOverride(override_mat); // if override mat exists, we must also have a source mat |