mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fix more segfaults on NetPlay quit
Basically everything here was race conditions in Qt callbacks, so I changed the client/server instances to std::shared_ptr and added null checks. It checks that the object exists in the callback, and the shared_ptr ensures it doesn't get destroyed until we're done with it. MD5 check would also cause a segfault if you quit without cancelling it first, which was pretty silly.
This commit is contained in:
@ -59,8 +59,8 @@ void PadMappingDialog::ConnectWidgets()
|
||||
|
||||
int PadMappingDialog::exec()
|
||||
{
|
||||
auto* client = Settings::Instance().GetNetPlayClient();
|
||||
auto* server = Settings::Instance().GetNetPlayServer();
|
||||
auto client = Settings::Instance().GetNetPlayClient();
|
||||
auto server = Settings::Instance().GetNetPlayServer();
|
||||
// Load Settings
|
||||
m_players = client->GetPlayers();
|
||||
m_pad_mapping = server->GetPadMapping();
|
||||
|
Reference in New Issue
Block a user