summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-07-18 01:56:42 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-07-18 01:56:42 +0300
commitbc3f2d53d10c64ccded6aaa14ea37eac78ef6856 (patch)
treecf78de68ab8ad66719659cf858fb073b4d2c4a13 /indra/llcharacter
parent37f41392cdb90f2b918828f0bc2b22f6705b6db4 (diff)
SL-19891 Make sure focusable elements clear focus on destruction
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 3cef382bbf..d95ec159f2 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -497,13 +497,20 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
// request asset
mAssetStatus = ASSET_FETCHED;
- LL_DEBUGS("Animation") << "Requesting data fetch for: " << mID << LL_ENDL;
- character_id = new LLUUID(mCharacter->getID());
- gAssetStorage->getAssetData(mID,
- LLAssetType::AT_ANIMATION,
- onLoadComplete,
- (void *)character_id,
- FALSE);
+ if (mID.notNull())
+ {
+ LL_DEBUGS("Animation") << "Requesting data fetch for: " << mID << LL_ENDL;
+ character_id = new LLUUID(mCharacter->getID());
+ gAssetStorage->getAssetData(mID,
+ LLAssetType::AT_ANIMATION,
+ onLoadComplete,
+ (void*)character_id,
+ FALSE);
+ }
+ else
+ {
+ LL_INFOS("Animation") << "Attempted to fetch animation " << mName << " with null id for character " << mCharacter->getID() << LL_ENDL;
+ }
return STATUS_HOLD;
case ASSET_FETCHED: