Checker: RESOURCE_LEAK
Function: LLAgentWearables::addLocalTextureObject(EWearableType, LLVOAvatarDefines::ETextureIndex, unsigned int)
File: /indra/newview/llagentwearables.cpp
meow-7.2.2
Tofu Linden 2010-01-27 15:04:12 -08:00
parent 576c69dfd9
commit 7dc1e2eedb
3 changed files with 5 additions and 4 deletions

View File

@ -1130,8 +1130,9 @@ void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type,
if (!wearable)
{
llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl;
return;
}
LLLocalTextureObject* lto = new LLLocalTextureObject();
LLLocalTextureObject lto;
wearable->setLocalTextureObject(texture_type, lto);
}

View File

@ -818,7 +818,7 @@ const LLLocalTextureObject* LLWearable::getConstLocalTextureObject(S32 index) co
return NULL;
}
void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto)
void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject &lto)
{
if( mTEMap.find(index) != mTEMap.end() )
{
@ -826,7 +826,7 @@ void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto)
}
if( lto )
{
mTEMap[index] = new LLLocalTextureObject(*lto);
mTEMap[index] = new LLLocalTextureObject(lto);
}
}

View File

@ -114,7 +114,7 @@ public:
LLLocalTextureObject* getLocalTextureObject(S32 index);
const LLLocalTextureObject* getConstLocalTextureObject(S32 index) const;
void setLocalTextureObject(S32 index, LLLocalTextureObject *lto);
void setLocalTextureObject(S32 index, LLLocalTextureObject &lto);
void addVisualParam(LLVisualParam *param);
void setVisualParams();
void setVisualParamWeight(S32 index, F32 value, BOOL upload_bake);