refactor: manually resets singletons (#3395)

This commit is contained in:
memchr
2023-09-22 10:06:09 +00:00
committed by GitHub
parent 1357b66091
commit ea5d9584da
3 changed files with 21 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ CAnimatedVariable::~CAnimatedVariable() {
}
void CAnimatedVariable::unregister() {
if (!g_pAnimationManager)
return;
std::erase_if(g_pAnimationManager->m_vAnimatedVariables, [&](const auto& other) { return other == this; });
m_bIsRegistered = false;
disconnectFromActive();