From 019585ed6c761a32b5d06990d7cf55388905113a Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 17 Feb 2011 13:52:58 -0500 Subject: SH-959 FIX crash in llflexibleobject.cpp Crash was a result of one of two possibilities: 1) trying to update geometry when it wasn't visible 2) mSimulateRes was non-zero when mInitialized was 0 Put code to handle both cases - initialize if mSimulateRes is 0 OR mInitialized is 0 But only do so if the object is visible. If the object is not visible, early out. Code reviewed by davep --- indra/newview/llflexibleobject.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llflexibleobject.cpp') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 689fa72958..bd939d8636 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -366,7 +366,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate() LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE); LLVolume* volume = mVO->getVolume(); LLPath *path = &volume->getPath(); - if (mSimulateRes == 0 && mVO->mDrawable->isVisible()) + if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible()) { mVO->markForUpdate(TRUE); if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0)) @@ -375,6 +375,11 @@ void LLVolumeImplFlexible::doFlexibleUpdate() } } + if (!mVO->mDrawable->isVisible()) + { + return; + } + llassert_always(mInitialized); S32 num_sections = 1 << mSimulateRes; -- cgit v1.2.3