summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-07-31 21:43:04 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-07-31 21:43:04 -0600
commit484f4230149e82345eccb38f9d4655b2a3f59984 (patch)
tree0db2bf2baddd7481bd735fe6996e35464bf226f6
parentd65243063c42b6df809873e917259e7db8d21ed4 (diff)
fix for SH-4393: Interesting: viewer crash in LLViewerRegion::addNewObject
-rwxr-xr-xindra/newview/llviewerregion.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e28ea6f988..c55ccce47a 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1303,6 +1303,16 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>&
LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
{
+ if(!entry || !entry->getEntry())
+ {
+ if(entry)
+ {
+ mImpl->mVisibleEntries.erase(entry);
+ entry->setState(LLVOCacheEntry::INACTIVE);
+ }
+ return NULL;
+ }
+
LLViewerObject* obj = NULL;
if(!entry->getEntry()->hasDrawable()) //not added to the rendering pipeline yet
{