diff options
author | Josh Bell <josh@lindenlab.com> | 2007-04-04 19:49:24 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-04-04 19:49:24 +0000 |
commit | 98740db8fd5875033d08b6aef6d9bf5c3c49eeee (patch) | |
tree | dd0e83734e50ffd4d9f87eb2ed4091f867f2f1fd /indra/newview/llpreviewanim.cpp | |
parent | aa96d1fddff3d5bf68a5014229a0d20584937222 (diff) |
svn merge -r 59826:59968 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/newview/llpreviewanim.cpp')
-rw-r--r-- | indra/newview/llpreviewanim.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 25273d035d..99cff4b718 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -73,11 +73,14 @@ LLPreviewAnim::LLPreviewAnim(const std::string& name, const LLRect& rect, const // static void LLPreviewAnim::endAnimCallback( void *userdata ) { - LLPreviewAnim* self = (LLPreviewAnim*) userdata; - - self->childSetValue("Anim play btn", FALSE); - self->childSetValue("Anim audition btn", FALSE); - + LLViewHandle* handlep = ((LLViewHandle*)userdata); + LLFloater* self = getFloaterByHandle(*handlep); + delete handlep; // done with the handle + if (self) + { + self->childSetValue("Anim play btn", FALSE); + self->childSetValue("Anim audition btn", FALSE); + } } // static @@ -105,7 +108,9 @@ void LLPreviewAnim::playAnim( void *userdata ) LLMotion* motion = avatar->findMotion(itemID); if (motion) - motion->setDeactivateCallback(&endAnimCallback, (void *)self); + { + motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLViewHandle(self->getHandle()))); + } } else { @@ -140,7 +145,9 @@ void LLPreviewAnim::auditionAnim( void *userdata ) LLMotion* motion = avatar->findMotion(itemID); if (motion) - motion->setDeactivateCallback(&endAnimCallback, (void *)self); + { + motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLViewHandle(self->getHandle()))); + } } else { @@ -190,8 +197,9 @@ void LLPreviewAnim::onClose(bool app_quitting) LLMotion* motion = avatar->findMotion(item->getAssetUUID()); if (motion) + { motion->setDeactivateCallback(NULL, (void *)NULL); - + } } destroy(); } |