MAINT-3308 : Crash in viewer with removeMissingBakedTextures() / updateMeshTextures() loop
Reviewed by Kelly
parent
b0a873570e
commit
9ccbf6bee8
|
|
@ -6453,7 +6453,7 @@ void LLVOAvatar::updateMeshTextures()
|
|||
|
||||
LLViewerTexLayerSet* layerset = getTexLayerSet(i);
|
||||
if (use_lkg_baked_layer[i] && !isUsingLocalAppearance() )
|
||||
{
|
||||
{
|
||||
LLViewerFetchedTexture* baked_img = LLViewerTextureManager::getFetchedTexture(mBakedTextureDatas[i].mLastTextureID);
|
||||
mBakedTextureDatas[i].mIsUsed = TRUE;
|
||||
|
||||
|
|
@ -6462,12 +6462,12 @@ void LLVOAvatar::updateMeshTextures()
|
|||
avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
|
||||
avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end();
|
||||
for (; iter != end; ++iter)
|
||||
{
|
||||
{
|
||||
LLAvatarJointMesh* mesh = (*iter);
|
||||
if (mesh)
|
||||
{
|
||||
{
|
||||
mesh->setTexture( baked_img );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!isUsingLocalAppearance() && is_layer_baked[i])
|
||||
|
|
@ -6511,7 +6511,7 @@ void LLVOAvatar::updateMeshTextures()
|
|||
if (mesh)
|
||||
{
|
||||
mesh->setLayerSet( layerset );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -6533,7 +6533,7 @@ void LLVOAvatar::updateMeshTextures()
|
|||
{
|
||||
LLAvatarJointMesh* mesh = (*iter);
|
||||
if (mesh)
|
||||
{
|
||||
{
|
||||
mesh->setColor( color );
|
||||
mesh->setTexture( hair_img );
|
||||
}
|
||||
|
|
@ -6561,7 +6561,15 @@ void LLVOAvatar::updateMeshTextures()
|
|||
}
|
||||
}
|
||||
}
|
||||
removeMissingBakedTextures();
|
||||
|
||||
// removeMissingBakedTextures() will call back into this rountine if something is removed, and can blow up the stack
|
||||
static bool call_remove_missing = true;
|
||||
if (call_remove_missing)
|
||||
{
|
||||
call_remove_missing = false;
|
||||
removeMissingBakedTextures(); // May call back into this function if anything is removed
|
||||
call_remove_missing = true;
|
||||
}
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -7778,7 +7786,7 @@ void LLVOAvatar::setIsUsingServerBakes(BOOL newval)
|
|||
|
||||
// virtual
|
||||
void LLVOAvatar::removeMissingBakedTextures()
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
|
|
|||
|
|
@ -847,7 +847,7 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
|
|||
if (!tex || tex->isMissingAsset())
|
||||
{
|
||||
LLViewerTexture *imagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT_AVATAR);
|
||||
if (imagep)
|
||||
if (imagep && imagep != tex)
|
||||
{
|
||||
setTEImage(te, imagep);
|
||||
removed = TRUE;
|
||||
|
|
@ -863,13 +863,13 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
|
|||
layerset->setUpdatesEnabled(TRUE);
|
||||
invalidateComposite(layerset, FALSE);
|
||||
}
|
||||
updateMeshTextures();
|
||||
updateMeshTextures(); // may call back into this function
|
||||
if (getRegion() && !getRegion()->getCentralBakeVersion())
|
||||
{
|
||||
requestLayerSetUploads();
|
||||
requestLayerSetUploads();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
|
||||
|
|
|
|||
Loading…
Reference in New Issue