Let gAgentAvatar be killed on shutdown.

This commit is contained in:
Shyotl
2011-10-08 03:03:11 -05:00
parent 464b16e621
commit 01e10b5087

View File

@@ -1239,8 +1239,9 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)
BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
{
// Don't commit suicide just because someone thinks you are on a ledge. -SG
if (objectp == gAgentAvatarp)
// Don't ever kill gAgentAvatarp, just force it to the agent's region
// unless region is NULL which is assumed to mean you are logging out.
if ((objectp == gAgentAvatarp) && gAgent.getRegion())
{
objectp->setRegion(gAgent.getRegion());
return FALSE;