diff options
author | Seth ProductEngine <slitovchuk@productengine.com> | 2012-03-21 18:34:02 +0200 |
---|---|---|
committer | Seth ProductEngine <slitovchuk@productengine.com> | 2012-03-21 18:34:02 +0200 |
commit | 60756667875748f68bf9deca97de29461c9eb93b (patch) | |
tree | 0831f25cfa019f45590c7b4da44a437cc5c9f188 /indra | |
parent | b0ba9364fce6ae3ff132f63729e3d5f9b100afe9 (diff) |
MAINT-272 FIXED Animation preview invalid pointer checks added.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloateranimpreview.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 2a3512e21a..adf2d6dbdd 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -416,6 +416,9 @@ void LLFloaterAnimPreview::draw() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::resetMotion() { + if (!mAnimPreview) + return; + LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); BOOL paused = avatarp->areAnimationsPaused(); @@ -535,6 +538,9 @@ BOOL LLFloaterAnimPreview::handleHover(S32 x, S32 y, MASK mask) //----------------------------------------------------------------------------- BOOL LLFloaterAnimPreview::handleScrollWheel(S32 x, S32 y, S32 clicks) { + if (!mAnimPreview) + return false; + mAnimPreview->zoom((F32)clicks * -0.2f); mAnimPreview->requestUpdate(); @@ -670,7 +676,7 @@ void LLFloaterAnimPreview::onCommitBaseAnim() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitLoop() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -689,7 +695,7 @@ void LLFloaterAnimPreview::onCommitLoop() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitLoopIn() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -709,7 +715,7 @@ void LLFloaterAnimPreview::onCommitLoopIn() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitLoopOut() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -729,7 +735,7 @@ void LLFloaterAnimPreview::onCommitLoopOut() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitName() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -770,7 +776,7 @@ void LLFloaterAnimPreview::onCommitEmote() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitPriority() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -784,7 +790,7 @@ void LLFloaterAnimPreview::onCommitPriority() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitEaseIn() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -799,7 +805,7 @@ void LLFloaterAnimPreview::onCommitEaseIn() //----------------------------------------------------------------------------- void LLFloaterAnimPreview::onCommitEaseOut() { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -814,7 +820,7 @@ void LLFloaterAnimPreview::onCommitEaseOut() //----------------------------------------------------------------------------- bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data) { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return false; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); @@ -834,7 +840,7 @@ bool LLFloaterAnimPreview::validateEaseIn(const LLSD& data) //----------------------------------------------------------------------------- bool LLFloaterAnimPreview::validateEaseOut(const LLSD& data) { - if (!getEnabled()) + if (!getEnabled() || !mAnimPreview) return false; LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar(); |