summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorStinson Linden <stinson@lindenlab.com>2014-05-14 22:55:19 +0100
committerStinson Linden <stinson@lindenlab.com>2014-05-14 22:55:19 +0100
commit76023f172c2a8eeb5c8d6b55119ef3e8faf8cc6f (patch)
treeff7d481970353ed222b1e95971fd4abe6665ee3b /indra/llcharacter
parent75538968dbc224a956115762a67e5da20c1d369f (diff)
MAINT-4009: Patching a leak of LLVisualParam derived objects that were being leaked because the LLWearable class was not destroying itself properly.
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-xindra/llcharacter/llvisualparam.cpp13
-rwxr-xr-xindra/llcharacter/llvisualparam.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/indra/llcharacter/llvisualparam.cpp b/indra/llcharacter/llvisualparam.cpp
index 0df7fb2bc3..dd87847c18 100755
--- a/indra/llcharacter/llvisualparam.cpp
+++ b/indra/llcharacter/llvisualparam.cpp
@@ -178,7 +178,10 @@ LLVisualParam::LLVisualParam()
//-----------------------------------------------------------------------------
LLVisualParam::~LLVisualParam()
{
- delete mNext;
+ if (mNext != NULL)
+ {
+ delete mNext;
+ }
}
/*
@@ -285,6 +288,14 @@ void LLVisualParam::setNextParam( LLVisualParam *next )
}
//-----------------------------------------------------------------------------
+// clearNextParam()
+//-----------------------------------------------------------------------------
+void LLVisualParam::clearNextParam()
+{
+ mNext = NULL;
+}
+
+//-----------------------------------------------------------------------------
// animate()
//-----------------------------------------------------------------------------
void LLVisualParam::animate( F32 delta, BOOL upload_bake )
diff --git a/indra/llcharacter/llvisualparam.h b/indra/llcharacter/llvisualparam.h
index a4d9f93e56..78c776705f 100755
--- a/indra/llcharacter/llvisualparam.h
+++ b/indra/llcharacter/llvisualparam.h
@@ -155,6 +155,7 @@ public:
LLVisualParam* getNextParam() { return mNext; }
void setNextParam( LLVisualParam *next );
+ void clearNextParam();
virtual void setAnimating(BOOL is_animating) { mIsAnimating = is_animating && !mIsDummy; }
BOOL getAnimating() const { return mIsAnimating; }