FIRE-6011; fix a crash when gAgentAvatp is not valid yet/anymore.

Nicky 2012-05-29 00:57:15 +02:00
parent 887bb084c5
commit bc2d733109
1 changed files with 8 additions and 2 deletions

View File

@ -3861,8 +3861,14 @@ class FSSelfCheckForceSit : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
bool new_value = gAgentAvatarp->isSitting();
return new_value;
// <FS:ND> don't use gAgentAvatarp if it's not valid yet/anymore.
// bool new_value = gAgentAvatarp->isSitting();
// return new_value;
if( !isAgentAvatarValid() )
return false;
return gAgentAvatarp->isSitting();
// </FS:ND>
}
};