summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-11-20 21:37:04 -0700
committerXiaohong Bao <bao@lindenlab.com>2012-11-20 21:37:04 -0700
commit551411247b8e4701e4768f61717b644750af83a7 (patch)
tree14754d1a2868191f44e5142e87e62236a9870b13 /indra
parentc180fe2ae2b5d2e00149f9902717e02ed7042143 (diff)
fix a crash caused by object cache for SH-3333.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llvocache.cpp12
-rw-r--r--indra/newview/llvocache.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 24bd68825b..e275b44e92 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -746,7 +746,7 @@ void LLViewerRegion::replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry
if(old_entry)
{
- new_entry->copy(old_entry);
+ old_entry->copyTo(new_entry);
state = old_entry->getState();
killCacheEntry(old_entry);
}
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index ec8585852b..8ea79dbae6 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -234,20 +234,20 @@ void LLVOCacheEntry::clearBridgeChild()
mState &= ~BRIDGE_CHILD;
}
-void LLVOCacheEntry::copy(LLVOCacheEntry* entry)
+void LLVOCacheEntry::copyTo(LLVOCacheEntry* new_entry)
{
//copy LLViewerOctreeEntry
- LLViewerOctreeEntry* oct_entry = entry->getEntry();
- if(!oct_entry)
+ if(mEntry.notNull())
{
- setOctreeEntry(oct_entry);
+ new_entry->setOctreeEntry(mEntry);
+ mEntry = NULL;
}
//copy children
- S32 num_children = entry->getNumOfChildren();
+ S32 num_children = getNumOfChildren();
for(S32 i = 0; i < num_children; i++)
{
- addChild(entry->getChild(i));
+ new_entry->addChild(getChild(i));
}
}
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index ded29dd990..4d058ffdac 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -111,7 +111,7 @@ public:
void recordHit();
void recordDupe() { mDupeCount++; }
- void copy(LLVOCacheEntry* entry); //copy variables
+ void copyTo(LLVOCacheEntry* new_entry); //copy variables
/*virtual*/ void setOctreeEntry(LLViewerOctreeEntry* entry);
void addChild(LLVOCacheEntry* entry);