mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
Merge pull request #7714 from cristian64/avoid_leaking_gamelistmodel
DolphinQt: Avoid leaking the GameListModel instance to gracefully shutdown the GameTracker and prevent a crash on exit
This commit is contained in:
@ -399,7 +399,7 @@ void MainWindow::CreateComponents()
|
||||
m_watch_widget = new WatchWidget(this);
|
||||
m_breakpoint_widget = new BreakpointWidget(this);
|
||||
m_code_widget = new CodeWidget(this);
|
||||
m_cheats_manager = new CheatsManager(this);
|
||||
m_cheats_manager = new CheatsManager(m_game_list->GetGameListModel(), this);
|
||||
|
||||
const auto request_watch = [this](QString name, u32 addr) {
|
||||
m_watch_widget->AddWatch(name, addr);
|
||||
@ -1276,8 +1276,9 @@ void MainWindow::BootWiiSystemMenu()
|
||||
|
||||
void MainWindow::NetPlayInit()
|
||||
{
|
||||
m_netplay_setup_dialog = new NetPlaySetupDialog(this);
|
||||
m_netplay_dialog = new NetPlayDialog;
|
||||
const auto& game_list_model = m_game_list->GetGameListModel();
|
||||
m_netplay_setup_dialog = new NetPlaySetupDialog(game_list_model, this);
|
||||
m_netplay_dialog = new NetPlayDialog(game_list_model);
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
m_netplay_discord = new DiscordHandler(this);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user