mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
Merge pull request #7979 from Techjar/netplay-browser-possible-crash
UICommon/NetPlayIndex: Fix possible crash when Add is called again
This commit is contained in:
commit
f2e3f69d34
1 changed files with 5 additions and 0 deletions
|
@ -197,6 +197,11 @@ bool NetPlayIndex::Add(NetPlaySession session)
|
||||||
m_player_count = session.player_count;
|
m_player_count = session.player_count;
|
||||||
m_game = session.game_id;
|
m_game = session.game_id;
|
||||||
|
|
||||||
|
m_session_thread_exit_event.Set();
|
||||||
|
if (m_session_thread.joinable())
|
||||||
|
m_session_thread.join();
|
||||||
|
m_session_thread_exit_event.Reset();
|
||||||
|
|
||||||
m_session_thread = std::thread([this] { NotificationLoop(); });
|
m_session_thread = std::thread([this] { NotificationLoop(); });
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue