summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-09 18:29:34 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-11-09 18:29:34 +0000
commitbb48fae5ceb577118cad436e7b0abe72f33ba031 (patch)
tree7240a002ca61f19a3039d51d8c76cac64d8f772a /indra/newview/llviewerobject.cpp
parent07e925d279b6c52c0cf352173dfb81fd1740d651 (diff)
SL-786 - control avatar deletion
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index e49c37be5e..3435217fa4 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2969,9 +2969,11 @@ void LLViewerObject::unlinkControlAvatar()
if (isRootEdit())
{
// This will remove the entire linkset from the control avatar
- LLControlAvatar *av = mControlAvatar;
- mControlAvatar = NULL;
- av->markForDeath();
+ if (mControlAvatar)
+ {
+ mControlAvatar->markForDeath();
+ mControlAvatar = NULL;
+ }
}
// For non-root prims, removing from the linkset will
// automatically remove the control avatar connection.