#2696 Viewer crashes on gestures : fix the bug (#3152)

Co-authored-by: Alexander Gavriliuk <alexandrgproductengine@lindenlab.com>
master
Brad Linden 2024-11-26 11:04:28 -08:00 committed by GitHub
parent d65fb7cec8
commit ca5119d577
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -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)