SL-786 - control avatar deletion

meow-7.2.2
Brad Payne (Vir Linden) 2017-11-09 18:29:34 +00:00
parent 07e925d279
commit bb48fae5ce
1 changed files with 5 additions and 3 deletions

View File

@ -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.