summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]indra/llcommon/llmd5.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llcommon/llmd5.h0
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp20
3 files changed, 12 insertions, 8 deletions
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp
index 75fde8e5ba..75fde8e5ba 100755..100644
--- a/indra/llcommon/llmd5.cpp
+++ b/indra/llcommon/llmd5.cpp
diff --git a/indra/llcommon/llmd5.h b/indra/llcommon/llmd5.h
index 1526e6ac3c..1526e6ac3c 100755..100644
--- a/indra/llcommon/llmd5.h
+++ b/indra/llcommon/llmd5.h
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 57b648769d..3ac7f12e4e 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -379,7 +379,8 @@ LLFloaterModelPreview::~LLFloaterModelPreview()
{
sInstance = NULL;
- if ( mModelPreview->mModelLoader->mResetJoints )
+ const LLModelLoader *model_loader = mModelPreview->mModelLoader;
+ if (model_loader && model_loader->mResetJoints)
{
gAgentAvatarp->resetJointPositions();
}
@@ -2391,11 +2392,9 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)
LLMutexLock lock(this);
- if (mModelLoader)
- {
- delete mModelLoader;
- mModelLoader = NULL;
- }
+ // This triggers if you bring up the file picker and then hit CANCEL.
+ // Just use the previous model (if any) and ignore that you brought up
+ // the file picker.
if (filename.empty())
{
@@ -2404,12 +2403,17 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)
// this is the initial file picking. Close the whole floater
// if we don't have a base model to show for high LOD.
mFMP->closeFloater(false);
+ mLoading = false;
}
-
- mLoading = false;
return;
}
+ if (mModelLoader)
+ {
+ delete mModelLoader;
+ mModelLoader = NULL;
+ }
+
mLODFile[lod] = filename;
if (lod == LLModel::LOD_HIGH)