summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-05-30 05:51:37 +0530
committerAnchor Linden <anchor@lindenlab.com>2018-05-30 05:51:37 +0530
commit71fa94b3665b4554470314f481c9f0a35f8e6ef2 (patch)
tree42c70f6b9df687aaf5e715060dde12b4f21ed22f /indra/newview/llvoavatar.cpp
parent0a36c8d3be17032db20a9bdeff2b00ae2ed608a0 (diff)
[MAINT-8693] - fix null check
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 7458c00b70..5eef48d735 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1007,7 +1007,7 @@ void LLVOAvatar::dumpBakedStatus()
const ETextureIndex index = baked_dict->mTextureIndex;
if (!inst->isTextureDefined(index))
{
- LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName;
+ LL_CONT << " " << LLAvatarAppearanceDictionary::getInstance()->getTexture(index) ? LLAvatarAppearanceDictionary::getInstance()->getTexture(index)->mName : "";
}
}
LL_CONT << " ) " << inst->getUnbakedPixelAreaRank();
@@ -4715,7 +4715,7 @@ void LLVOAvatar::collectLocalTextureUUIDs(std::set<LLUUID>& ids) const
if (imagep)
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)texture_index);
- if (texture_dict->mIsLocalTexture)
+ if (texture_dict && texture_dict->mIsLocalTexture)
{
ids.insert(imagep->getID());
}
@@ -4872,8 +4872,8 @@ void LLVOAvatar::updateTextures()
if (imagep)
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture((ETextureIndex)texture_index);
- const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
- if (texture_dict->mIsLocalTexture)
+ const EBakedTextureIndex baked_index = texture_dict ? texture_dict->mBakedTextureIndex : EBakedTextureIndex::BAKED_NUM_INDICES;
+ if (texture_dict && texture_dict->mIsLocalTexture)
{
addLocalTextureStats((ETextureIndex)texture_index, imagep, texel_area_ratio, render_avatar, mBakedTextureDatas[baked_index].mIsUsed);
}