Added isAgentAvatarValid() helper function from v2

Nullchecks
Flight-state tweaks
This commit is contained in:
Shyotl
2011-03-25 17:50:06 -05:00
parent 39af56c6f7
commit f73c666f0e
7 changed files with 119 additions and 98 deletions

View File

@@ -369,11 +369,10 @@ void LLViewerObject::markDead()
if (flagAnimSource())
{
LLVOAvatar* avatarp = gAgent.getAvatarObject();
if (avatarp && !avatarp->isDead())
if (isAgentAvatarValid())
{
// stop motions associated with this object
avatarp->stopMotionFromSource(mID);
gAgent.getAvatarObject()->stopMotionFromSource(mID);
}
}