SL-17276 Potential fix for crash on shutdown on mac.
parent
436544a51a
commit
a00a569ac8
|
|
@ -852,6 +852,7 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
|
|||
|
||||
LLSpatialPartition::~LLSpatialPartition()
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
|
||||
|
|
|
|||
|
|
@ -1325,8 +1325,13 @@ LLViewerOctreePartition::LLViewerOctreePartition() :
|
|||
|
||||
LLViewerOctreePartition::~LLViewerOctreePartition()
|
||||
{
|
||||
delete mOctree;
|
||||
mOctree = NULL;
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void LLViewerOctreePartition::cleanup()
|
||||
{
|
||||
delete mOctree;
|
||||
mOctree = nullptr;
|
||||
}
|
||||
|
||||
BOOL LLViewerOctreePartition::isOcclusionEnabled()
|
||||
|
|
@ -1334,6 +1339,7 @@ BOOL LLViewerOctreePartition::isOcclusionEnabled()
|
|||
return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
//class LLViewerOctreeCull definitions
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -352,6 +352,10 @@ public:
|
|||
virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0;
|
||||
BOOL isOcclusionEnabled();
|
||||
|
||||
protected:
|
||||
// MUST call from destructor of any derived classes (SL-17276)
|
||||
void cleanup();
|
||||
|
||||
public:
|
||||
U32 mPartitionType;
|
||||
U32 mDrawableType;
|
||||
|
|
|
|||
|
|
@ -632,6 +632,13 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
|
|||
new LLVOCacheGroup(mOctree, this);
|
||||
}
|
||||
|
||||
LLVOCachePartition::~LLVOCachePartition()
|
||||
{
|
||||
// SL-17276 make sure to do base class cleanup while this instance
|
||||
// can still be treated as an LLVOCachePartition
|
||||
cleanup();
|
||||
}
|
||||
|
||||
bool LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry)
|
||||
{
|
||||
llassert(entry->hasVOCacheEntry());
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ class LLVOCachePartition : public LLViewerOctreePartition
|
|||
{
|
||||
public:
|
||||
LLVOCachePartition(LLViewerRegion* regionp);
|
||||
virtual ~LLVOCachePartition();
|
||||
|
||||
bool addEntry(LLViewerOctreeEntry* entry);
|
||||
void removeEntry(LLViewerOctreeEntry* entry);
|
||||
|
|
|
|||
Loading…
Reference in New Issue