summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llappearance/llwearable.cpp4
-rw-r--r--indra/newview/lldrawpoolalpha.cpp3
-rw-r--r--indra/newview/llfloateravatartextures.cpp4
-rw-r--r--indra/newview/llviewerwearable.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp8
-rw-r--r--indra/newview/llvoavatarself.cpp4
6 files changed, 15 insertions, 10 deletions
diff --git a/indra/llappearance/llwearable.cpp b/indra/llappearance/llwearable.cpp
index edcfd49bb4..6079913a8e 100644
--- a/indra/llappearance/llwearable.cpp
+++ b/indra/llappearance/llwearable.cpp
@@ -184,7 +184,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
{
LLTexLayerSet *layer_set = NULL;
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;
@@ -197,7 +197,7 @@ void LLWearable::createLayers(S32 te, LLAvatarAppearance *avatarp)
}
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;
}
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index b0d48abb14..0873300cd2 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -328,6 +328,9 @@ void LLDrawPoolAlpha::render(S32 pass)
gGL.diffuseColor4f(0, 0, 1, 1);
pushBatches(LLRenderPass::PASS_MATERIAL_ALPHA_MASK, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
+ gGL.diffuseColor4f(0, 1, 0, 1);
+ pushBatches(LLRenderPass::PASS_INVISIBLE, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, FALSE);
+
if(shaders)
{
gHighlightProgram.unbind();
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 78807a8e99..8e654a53c4 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -78,7 +78,7 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
{
LLUUID id = IMG_DEFAULT_AVATAR;
const LLAvatarAppearanceDictionary::TextureEntry* tex_entry = LLAvatarAppearanceDictionary::getInstance()->getTexture(te);
- if (tex_entry->mIsLocalTexture)
+ if (tex_entry && tex_entry->mIsLocalTexture)
{
if (avatarp->isSelf())
{
@@ -96,7 +96,7 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
}
else
{
- id = avatarp->getTE(te)->getID();
+ id = tex_entry ? avatarp->getTE(te)->getID() : IMG_DEFAULT_AVATAR;
}
//id = avatarp->getTE(te)->getID();
if (id == IMG_DEFAULT_AVATAR)
diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index ae9ce37a28..2d7a0f920f 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -301,7 +301,7 @@ void LLViewerWearable::setTexturesToDefaults()
LLUUID LLViewerWearable::getDefaultTextureImageID(ETextureIndex index) const
{
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index);
- const std::string &default_image_name = texture_dict->mDefaultImageName;
+ const std::string &default_image_name = texture_dict ? texture_dict->mDefaultImageName : "";
if (default_image_name == "")
{
return IMG_DEFAULT_AVATAR;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 7458c00b70..b221dc7c35 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);
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 00e72bfbff..b2954f4de2 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2606,6 +2606,8 @@ void LLVOAvatarSelf::requestLayerSetUpdate(ETextureIndex index )
if( mUpperBodyLayerSet )
mUpperBodyLayerSet->requestUpdate(); */
const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = LLAvatarAppearanceDictionary::getInstance()->getTexture(index);
+ if (!texture_dict)
+ return;
if (!texture_dict->mIsLocalTexture || !texture_dict->mIsUsedByBakedTexture)
return;
const EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex;
@@ -2622,7 +2624,7 @@ LLViewerTexLayerSet* LLVOAvatarSelf::getLayerSet(ETextureIndex index) const
case TEX_HEAD_BODYPAINT:
return mHeadLayerSet; */
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;
return getLayerSet(baked_index);