Fix EXP-825: check for null gAgentAvatarp to prevent crash (hopefully).

master
Andrew A. de Laix 2011-06-21 08:54:34 -07:00
parent 7b33ae4456
commit fae829c8ef
1 changed files with 1 additions and 0 deletions

View File

@ -639,6 +639,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
if (click_action == CLICK_ACTION_NONE // not doing 1-click action
&& gSavedSettings.getBOOL("ClickToWalk") // click to walk enabled
&& !gAgent.getFlying() // don't auto-navigate while flying until that works
&& gAgentAvatarp
&& !gAgentAvatarp->isSitting()
&& !mBlockClickToWalk // another behavior hasn't cancelled click to walk
&& !mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick