From ea5d9584dafc73412489b96369ffb090f51edb4d Mon Sep 17 00:00:00 2001 From: memchr <118117622+memchr@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:06:09 +0000 Subject: refactor: manually resets singletons (#3395) --- src/helpers/AnimatedVariable.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/helpers/AnimatedVariable.cpp') 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(); -- cgit v1.2.3