diff options
author | prep <prep@lindenlab.com> | 2011-03-28 17:50:12 -0400 |
---|---|---|
committer | prep <prep@lindenlab.com> | 2011-03-28 17:50:12 -0400 |
commit | 86f3c3f276f131c4a192268733e7fc8b7e81d2c9 (patch) | |
tree | 92bf952177ad8c15679ddedd0f87c2974b64d5c7 /indra/newview/llfloatermodelpreview.cpp | |
parent | 835671f27809ce8e5ab17e6c299be35260239d51 (diff) |
Fix for issue caused by uploading the TurboSquid book collection (that avatar was having it's joints reet)
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index e440fa52d4..eebeb53cdb 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -389,7 +389,11 @@ LLFloaterModelPreview::~LLFloaterModelPreview() gAgentAvatarp->resetJointPositions();
}
- delete mModelPreview;
+
+ if ( mModelPreview )
+ {
+ delete mModelPreview;
+ }
if (mGLName)
{
@@ -1556,7 +1560,7 @@ bool LLModelLoader::doLoadModel() //a skinned asset attached to a node in a file that contains an entire skeleton,
//but does not use the skeleton).
mPreview->setRigValid( doesJointArrayContainACompleteRig( model->mJointList ) );
- if ( !skeletonWithNoRootNode && !model->mJointList.empty() && mPreview->isRigValid() )
+ if ( !skeletonWithNoRootNode && !model->mJointList.empty() && mPreview->isRigValid() )
{
mResetJoints = true;
}
@@ -1878,8 +1882,6 @@ void LLModelLoader::loadModelCallback() { //wait until this thread is stopped before deleting self
apr_sleep(100);
}
-
- delete this;
}
void LLModelLoader::handlePivotPoint( daeElement* pRoot )
@@ -2454,7 +2456,8 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) LLModelPreview::~LLModelPreview()
{
if (mModelLoader)
- {
+ {
+ delete mModelLoader;
mModelLoader->mPreview = NULL;
}
//*HACK : *TODO : turn this back on when we understand why this crashes
|