[LL] Null checks, and demote a LL_ERRS to LL_WARNS.

This commit is contained in:
Router Gray
2019-10-19 21:37:06 -05:00
parent 05146faacf
commit 1d1857e5a7
2 changed files with 5 additions and 3 deletions

View File

@@ -184,7 +184,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
{ {
LLTexLayerSet *layer_set = NULL; LLTexLayerSet *layer_set = NULL;
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te); const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)te);
if (texture_dict->mIsUsedByBakedTexture) if (texture_dict && texture_dict->mIsUsedByBakedTexture)
{ {
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
@@ -197,7 +197,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
} }
else else
{ {
LL_ERRS() << "could not find layerset for LTO in wearable!" << LL_ENDL; LL_WARNS() << "could not find layerset for LTO in wearable!" << LL_ENDL;
} }
} }

View File

@@ -2892,6 +2892,8 @@ void LLVOAvatarSelf::requestLayerSetUpdate(ETextureIndex index )
if( mUpperBodyLayerSet ) if( mUpperBodyLayerSet )
mUpperBodyLayerSet->requestUpdate(); */ mUpperBodyLayerSet->requestUpdate(); */
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index); const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index);
if (!texture_dict)
return;
if (!texture_dict->mIsLocalTexture || !texture_dict->mIsUsedByBakedTexture) if (!texture_dict->mIsLocalTexture || !texture_dict->mIsUsedByBakedTexture)
return; return;
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
@@ -2908,7 +2910,7 @@ LLViewerTexLayerSet* LLVOAvatarSelf::getLayerSet(ETextureIndex index) const
case TEX_HEAD_BODYPAINT: case TEX_HEAD_BODYPAINT:
return mHeadLayerSet; */ return mHeadLayerSet; */
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index); const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index);
if (texture_dict->mIsUsedByBakedTexture) if (texture_dict && texture_dict->mIsUsedByBakedTexture)
{ {
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
return getLayerSet(baked_index); return getLayerSet(baked_index);