diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index 833f4da4dc..7c2a7683f8 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -32,12 +32,17 @@ MainWindow::MainWindow() : QMainWindow(nullptr) ConnectMenuBar(); } +MainWindow::~MainWindow() +{ + m_render_widget->deleteLater(); +} + void MainWindow::CreateComponents() { m_menu_bar = new MenuBar(this); m_tool_bar = new ToolBar(this); m_game_list = new GameList(this); - m_render_widget = new RenderWidget(this); + m_render_widget = new RenderWidget; m_stack = new QStackedWidget(this); m_paths_dialog = new PathDialog(this); } diff --git a/Source/Core/DolphinQt2/MainWindow.h b/Source/Core/DolphinQt2/MainWindow.h index ab81a57e9f..a5120d86d7 100644 --- a/Source/Core/DolphinQt2/MainWindow.h +++ b/Source/Core/DolphinQt2/MainWindow.h @@ -22,6 +22,7 @@ class MainWindow final : public QMainWindow public: explicit MainWindow(); + ~MainWindow(); signals: void EmulationStarted();