summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolumemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/llvolumemgr.cpp')
-rw-r--r--indra/llmath/llvolumemgr.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/indra/llmath/llvolumemgr.cpp b/indra/llmath/llvolumemgr.cpp
index 945d74f7c1..1a448ed8e0 100644
--- a/indra/llmath/llvolumemgr.cpp
+++ b/indra/llmath/llvolumemgr.cpp
@@ -229,12 +229,6 @@ LLVolumeLODGroup::LLVolumeLODGroup(const LLVolumeParams &params)
LLVolumeLODGroup::~LLVolumeLODGroup()
{
- S32 i;
- for (i = 0; i < NUM_LODS; i++)
- {
- delete mVolumeLODs[i];
- mVolumeLODs[i] = NULL;
- }
}
@@ -242,11 +236,12 @@ LLVolume * LLVolumeLODGroup::getLOD(const S32 detail)
{
llassert(detail >=0 && detail < NUM_LODS);
mAccessCount[detail]++;
- mLODRefs[detail]++;
- if (!mVolumeLODs[detail])
+
+ if (!mLODRefs[detail])
{
mVolumeLODs[detail] = new LLVolume(mParams, mDetailScales[detail]);
}
+ mLODRefs[detail]++;
return mVolumeLODs[detail];
}