Skip to content

Commit 675dbd7

Browse files
committed
#2696 Viewer crashes on gestures : fix the bug
1 parent 40a6dda commit 675dbd7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

indra/llcharacter/llkeyframemotion.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,9 +2427,15 @@ void LLKeyframeMotion::onLoadComplete(const LLUUID& asset_uuid,
24272427
LLCharacter* character = *char_iter;
24282428

24292429
// look for an existing instance of this motion
2430-
LLKeyframeMotion* motionp = static_cast<LLKeyframeMotion*> (character->findMotion(asset_uuid));
2431-
if (motionp)
2430+
if (LLMotion* asset = character->findMotion(asset_uuid))
24322431
{
2432+
LLKeyframeMotion* motionp = dynamic_cast<LLKeyframeMotion*>(asset);
2433+
if (!motionp)
2434+
{
2435+
// This motion is not LLKeyframeMotion (e.g., LLEmote)
2436+
return;
2437+
}
2438+
24332439
if (0 == status)
24342440
{
24352441
if (motionp->mAssetStatus == ASSET_LOADED)

0 commit comments

Comments
 (0)