From 1b63776f2d8e4e382e1b735ed3ec7061f1698e5b Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sun, 16 Nov 2025 23:40:02 -0600 Subject: [PATCH] Common/ScopeGuard: Fix move constructor. --- Source/Core/Common/ScopeGuard.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Core/Common/ScopeGuard.h b/Source/Core/Common/ScopeGuard.h index 2e313396a90..9e419f4d870 100644 --- a/Source/Core/Common/ScopeGuard.h +++ b/Source/Core/Common/ScopeGuard.h @@ -13,10 +13,7 @@ class ScopeGuard final public: ScopeGuard(Callable&& finalizer) : m_finalizer(std::forward(finalizer)) {} - ScopeGuard(ScopeGuard&& other) : m_finalizer(std::move(other.m_finalizer)) - { - other.m_finalizer = nullptr; - } + ScopeGuard(ScopeGuard&& other) : m_finalizer(std::move(other.m_finalizer)) { other.Dismiss(); } ~ScopeGuard() { Exit(); } void Dismiss() { m_finalizer.reset(); }