From 294c5f3d3a29f1d52b587b9b1750b65238ca2dee Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 23 May 2011 12:15:04 -0400 Subject: SH-1616 FIX SL client crashes on startup for debug builds Added more NULL checks for llconvexdecompositionstub, to avoid crashing. Clients won't be able to upload meshes using the stub, but should be able to run the client otherwise. --- indra/newview/llmeshrepository.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra') diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 0a1eadf4d0..f06c5dcd64 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -3374,6 +3374,12 @@ void LLPhysicsDecomp::doDecomposition() LLCDMeshData mesh; S32 stage = mStageID[mCurRequest->mStage]; + if (LLConvexDecomposition::getInstance() == NULL) + { + // stub library. do nothing. + return; + } + //load data intoLLCD if (stage == 0) { @@ -3574,6 +3580,12 @@ void LLPhysicsDecomp::doDecompositionSingleHull() LLConvexDecomposition* decomp = LLConvexDecomposition::getInstance(); + if (decomp == NULL) + { + //stub. do nothing. + return; + } + for (S32 i = 0; i < param_count; ++i) { decomp->setParam(params[i].mName, params[i].mDefault.mIntOrEnumValue); @@ -3653,6 +3665,11 @@ void LLPhysicsDecomp::doDecompositionSingleHull() void LLPhysicsDecomp::run() { LLConvexDecomposition* decomp = LLConvexDecomposition::getInstance(); + if (decomp == NULL) + { + return; + } + decomp->initThread(); mInited = true; -- cgit v1.2.3