From 505b067191c29e798987722b92d7af2b92515109 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sat, 9 Jul 2011 00:38:11 +0300 Subject: Fix #985: Crash after teleport Stale LLVOVolume pointer was caused by a leftover from porting the sculpt->volumes list from V2, which I forgot to port. Needed for correct volume accounting. --- linden/indra/newview/llvovolume.cpp | 14 ++++++++++++++ linden/indra/newview/llvovolume.h | 1 + 2 files changed, 15 insertions(+) diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index d40ee99..b422c51 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp @@ -108,6 +108,20 @@ LLVOVolume::~LLVOVolume() mVolumeImpl = NULL; } +// virtual +void LLVOVolume::markDead() +{ + if (!mDead) + { + if (mSculptTexture.notNull()) + { + mSculptTexture->removeVolume(this); + } + } + + LLViewerObject::markDead(); +} + // static void LLVOVolume::initClass() diff --git a/linden/indra/newview/llvovolume.h b/linden/indra/newview/llvovolume.h index 25f5d95..2f53bea 100644 --- a/linden/indra/newview/llvovolume.h +++ b/linden/indra/newview/llvovolume.h @@ -91,6 +91,7 @@ public: public: LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); + /*virtual*/ void markDead(); // Override (and call through to parent) to clean up sculpt texture references /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); -- cgit v1.1