mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
WiimoteReal: Fix Dolphin shutdown crash
Clear m_scan_thread_running later to avoid accessing m_backends after it has been cleared.
This commit is contained in:
@ -547,7 +547,7 @@ void WiimoteScanner::StartThread()
|
|||||||
|
|
||||||
void WiimoteScanner::StopThread()
|
void WiimoteScanner::StopThread()
|
||||||
{
|
{
|
||||||
if (m_scan_thread_running.TestAndClear())
|
if (m_scan_thread_running.IsSet())
|
||||||
{
|
{
|
||||||
SetScanMode(WiimoteScanMode::DO_NOT_SCAN);
|
SetScanMode(WiimoteScanMode::DO_NOT_SCAN);
|
||||||
|
|
||||||
@ -556,6 +556,7 @@ void WiimoteScanner::StopThread()
|
|||||||
backend->RequestStopSearching();
|
backend->RequestStopSearching();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_scan_thread_running.Clear();
|
||||||
m_scan_thread.join();
|
m_scan_thread.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user