From 47cc5b02e3dc78ed9520d691607c2a8427e50440 Mon Sep 17 00:00:00 2001 From: Techjar Date: Sat, 19 Jan 2019 04:37:07 -0500 Subject: [PATCH] Qt/MainWindow: Directly delete unparented dialogs Calling deleteLater in MainWindow's destructor doesn't work, as the event loop will stop before it gets around to deleting these dialogs. Seeing as this is a QObject destructor, we should already be on the event loop anyways, so simply using delete should be safe. --- Source/Core/DolphinQt/MainWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index ef9557e3db..9a0cdc0305 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -243,13 +243,13 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters) : QMainW MainWindow::~MainWindow() { - m_render_widget->deleteLater(); - m_netplay_dialog->deleteLater(); + delete m_render_widget; + delete m_netplay_dialog; for (int i = 0; i < 4; i++) { - m_gc_tas_input_windows[i]->deleteLater(); - m_wii_tas_input_windows[i]->deleteLater(); + delete m_gc_tas_input_windows[i]; + delete m_wii_tas_input_windows[i]; } ShutdownControllers();