diff options
| author | memchr <118117622+memchr@users.noreply.github.com> | 2023-09-22 10:06:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 11:06:09 +0100 |
| commit | ea5d9584dafc73412489b96369ffb090f51edb4d (patch) | |
| tree | 66b6c3e4ab51d77ac4b55d5ff44eecb3f1696986 /src/helpers/AnimatedVariable.cpp | |
| parent | 1357b66091ecd73f097d19d527a23a9ae72a4ff1 (diff) | |
refactor: manually resets singletons (#3395)
Diffstat (limited to 'src/helpers/AnimatedVariable.cpp')
| -rw-r--r-- | src/helpers/AnimatedVariable.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers/AnimatedVariable.cpp b/src/helpers/AnimatedVariable.cpp index 8c5c889f..50de0149 100644 --- a/src/helpers/AnimatedVariable.cpp +++ b/src/helpers/AnimatedVariable.cpp @@ -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(); |
