summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2009-06-27 01:05:56 +0000
committerXiaohong Bao <bao@lindenlab.com>2009-06-27 01:05:56 +0000
commitcb8641a639d077fe03853e69be597ee359f5a01f (patch)
treef6f76a534fc45fd4a2bbdface46d62cc5d6237f6 /indra/newview/llvovolume.cpp
parent6f613fb70ff28ee090dc0871b461a62bd2aa0d08 (diff)
fix for DEV-27483/SEC-283: Viewer crash: LLXform::setParent Creating loop when setting parent
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index aff8fe8f1d..f31f09f60e 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -934,17 +934,20 @@ void LLVOVolume::updateFaceFlags()
}
}
-void LLVOVolume::setParent(LLViewerObject* parent)
+BOOL LLVOVolume::setParent(LLViewerObject* parent)
{
+ BOOL ret = FALSE ;
if (parent != getParent())
{
- LLViewerObject::setParent(parent);
- if (mDrawable)
+ ret = LLViewerObject::setParent(parent);
+ if (ret && mDrawable)
{
gPipeline.markMoved(mDrawable);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
}
}
+
+ return ret ;
}
// NOTE: regenFaces() MUST be followed by genTriangles()!