summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-07-11 15:14:13 -0500
committerDave Parks <davep@lindenlab.com>2012-07-11 15:14:13 -0500
commitc0e2d4d988ba6d7d28bfa0487006349266e80709 (patch)
tree0aff6203a30294c73078f81aec0212ecbde0d1bd /indra/newview/llviewerobject.cpp
parente5d2ddc4843c5ecee4a735bd409b41cbf0d438eb (diff)
MAINT-794 Fix for assert on loading some types of objects before their parents.
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index f5a3681437..b52c9d0d4b 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -782,7 +782,13 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
}
LLDrawable* old_parent = mDrawable->mParent;
mDrawable->mParent = parentp;
-
+
+ if (parentp && mDrawable->isActive())
+ {
+ parentp->makeActive();
+ parentp->setState(LLDrawable::ACTIVE_CHILD);
+ }
+
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
if( (old_parent != parentp && old_parent)
|| (parentp && parentp->isActive()))