diff options
author | Callum Linden <callum@lindenlab.com> | 2022-10-25 16:57:32 -0700 |
---|---|---|
committer | Callum Linden <callum@lindenlab.com> | 2022-10-25 16:57:32 -0700 |
commit | 86da2f74139438dcc2c10702d4cca63313a34a90 (patch) | |
tree | f81641e3db923ae7e9b6fbbf683334197fadf284 /indra/newview/llfloaterhoverheight.cpp | |
parent | 0cdb792d904198131187d6ead102f951b2894bd0 (diff) | |
parent | e45b6159666b3aa271eaaa366fb4bcade2c2a28b (diff) |
Merge branch 'master' into DRTVWR-489-emoji
Diffstat (limited to 'indra/newview/llfloaterhoverheight.cpp')
-rw-r--r-- | indra/newview/llfloaterhoverheight.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llfloaterhoverheight.cpp b/indra/newview/llfloaterhoverheight.cpp index 42c5e40761..a00fc4aa84 100644 --- a/indra/newview/llfloaterhoverheight.cpp +++ b/indra/newview/llfloaterhoverheight.cpp @@ -100,11 +100,14 @@ void LLFloaterHoverHeight::onClose(bool app_quitting) // static void LLFloaterHoverHeight::onSliderMoved(LLUICtrl* ctrl, void* userData) { - LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); - F32 value = sldrCtrl->getValueF32(); - LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z)); - LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL; - gAgentAvatarp->setHoverOffset(offset, false); + if (isAgentAvatarValid()) + { + LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl); + F32 value = sldrCtrl->getValueF32(); + LLVector3 offset(0.0, 0.0, llclamp(value, MIN_HOVER_Z, MAX_HOVER_Z)); + LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL; + gAgentAvatarp->setHoverOffset(offset, false); + } } // Do send-to-the-server work when slider drag completes, or new |