diff --git a/src/main/native/include/support/SafeThread.h b/src/main/native/include/support/SafeThread.h index 0f39bc6811..cad4cdb3b5 100644 --- a/src/main/native/include/support/SafeThread.h +++ b/src/main/native/include/support/SafeThread.h @@ -34,7 +34,7 @@ class SafeThreadProxyBase { public: SafeThreadProxyBase(SafeThread* thr) : m_thread(thr) { if (!m_thread) return; - std::unique_lock(m_thread->m_mutex).swap(m_lock); + m_lock = std::unique_lock(m_thread->m_mutex); if (!m_thread->m_active) { m_lock.unlock(); m_thread = nullptr;