Fix crash at logout

master
Ansariel 2025-12-02 00:48:54 +01:00
parent b65088fcee
commit 0fe67cddcc
1 changed files with 18 additions and 15 deletions

View File

@ -69,7 +69,10 @@ AOEngine::AOEngine() :
AOEngine::~AOEngine()
{
LLSD currentState = LLSD().with("CurrentSet", mCurrentSet->getName());
LLSD currentState = LLSD::emptyMap();
if (mCurrentSet)
{
currentState = LLSD().with("CurrentSet", mCurrentSet->getName());
LLSD currentAnimations;
for (S32 index = 0; index < AOSet::AOSTATES_MAX; ++index)
{
@ -87,8 +90,8 @@ AOEngine::~AOEngine()
}
}
currentState.insert("CurrentStateAnimations", currentAnimations);
}
LL_DEBUGS("AOEngine") << "Stored AO state: " << currentState << LL_ENDL;
gSavedPerAccountSettings.setLLSD("FSCurrentAOState", currentState);
clear(false);