SL-18493 Fix for assert when setting override before material has arrived

meow-7.2.2
Dave Parks 2022-10-28 11:50:32 -05:00
parent 2752ab3b62
commit e72d0161bb
1 changed files with 7 additions and 0 deletions

View File

@ -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