diff options
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 8 | 
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.  | 
