From 997d66d348b3c6a19ecd2f5b092f68f645712eb1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 15 Oct 2010 16:33:22 -0500 Subject: Fix for various crashes on exit and leaks when using convex decomposition. Make rendering of convex hullified prims work in physics shape display. Reviewed by Falcon. --- indra/newview/llfloatermodelpreview.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 258da7b406..d067970806 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -868,16 +868,17 @@ void LLFloaterModelPreview::showDecompFloater() cur_y += 30; - const LLCDStageData* stage; - S32 stage_count = 0; - if (LLConvexDecomposition::getInstance() != NULL) + static const LLCDStageData* stage = NULL; + static S32 stage_count = 0; + + if (!stage && LLConvexDecomposition::getInstance() != NULL) { stage_count = LLConvexDecomposition::getInstance()->getStages(&stage); } - const LLCDParam* param; - S32 param_count = 0; - if (LLConvexDecomposition::getInstance() != NULL) + static const LLCDParam* param = NULL; + static S32 param_count = 0; + if (!param && LLConvexDecomposition::getInstance() != NULL) { param_count = LLConvexDecomposition::getInstance()->getParameters(¶m); } -- cgit v1.2.3