diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-11-26 11:04:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 11:04:28 -0800 |
commit | ca5119d577c6b621fc4ca96f0e408953126036a7 (patch) | |
tree | cdb3d61aa27c6e78a4d6878f78bed5927bef013e | |
parent | d65fb7cec8ce36ce7f6ff082f8d04bdd8bc0208c (diff) |
#2696 Viewer crashes on gestures : fix the bug (#3152)
Co-authored-by: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 6790f1ad56..b82734615f 100644 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -2427,9 +2427,15 @@ void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid, LLCharacter* character = *char_iter; // look for an existing instance of this motion - LLKeyframeMotion* motionp = static_cast<LLKeyframeMotion*> (character->findMotion(asset_uuid)); - if (motionp) + if (LLMotion* asset = character->findMotion(asset_uuid)) { + LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(asset); + if (!motionp) + { + // This motion is not LLKeyframeMotion (e.g., LLEmote) + return; + } + if (0 == status) { if (motionp->mAssetStatus == ASSET_LOADED) |