summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-06-09 17:08:17 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-06-09 17:08:17 -0600
commitfa4d4469dd229030b46c11c6060fdbcfaec12e41 (patch)
tree620f99cda028e4ddee4f9243d69b4fbab1dc6814
parentf14fc028af5f75601eaaedf5ed3923a9d039bad7 (diff)
parent73226014555b028ae2bdec29b8c7d60e6c20c2df (diff)
Automated merge with https://bitbucket.org/davep/mesh-asset-deprecation
-rw-r--r--indra/newview/llfloatermodelpreview.cpp7
-rw-r--r--indra/newview/llfloatermodelwizard.cpp7
-rwxr-xr-xindra/newview/llmeshrepository.cpp5
-rw-r--r--indra/newview/llmeshrepository.h2
4 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 5f961e2dbc..409d8bc79a 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -915,8 +915,11 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data)
{
LLModel* mdl = sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS][i];
DecompRequest* request = new DecompRequest(stage, mdl);
- sInstance->mCurRequest.insert(request);
- gMeshRepo.mDecompThread->submitRequest(request);
+ if(request->isValid())
+ {
+ sInstance->mCurRequest.insert(request);
+ gMeshRepo.mDecompThread->submitRequest(request);
+ }
}
}
diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp
index 0cd66fbdc2..707c8288df 100644
--- a/indra/newview/llfloatermodelwizard.cpp
+++ b/indra/newview/llfloatermodelwizard.cpp
@@ -422,8 +422,11 @@ void LLFloaterModelWizard::executePhysicsStage(std::string stage_name)
{
LLModel* mdl = sInstance->mModelPreview->mModel[LLModel::LOD_PHYSICS][i];
DecompRequest* request = new DecompRequest(stage_name, mdl);
- sInstance->mCurRequest.insert(request);
- gMeshRepo.mDecompThread->submitRequest(request);
+ if(request->isValid())
+ {
+ sInstance->mCurRequest.insert(request);
+ gMeshRepo.mDecompThread->submitRequest(request);
+ }
}
}
}
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 7568f3659b..111802cd47 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -1640,7 +1640,10 @@ void LLMeshUploadThread::doWholeModelUpload()
llassert(physics != NULL);
DecompRequest* request = new DecompRequest(physics, data.mBaseModel, this);
- gMeshRepo.mDecompThread->submitRequest(request);
+ if(request->isValid())
+ {
+ gMeshRepo.mDecompThread->submitRequest(request);
+ }
}
while (!mPhysicsComplete)
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index adf60c7e03..f237c3a60e 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -161,6 +161,8 @@ public:
virtual void setStatusMessage(const std::string& msg);
+ bool isValid() const {return mPositions.size() > 2 && mIndices.size() > 2 ;}
+
protected:
//internal use
LLVector3 mBBox[2] ;