From 562e0114eb2def50071b6f2a1fcacad681216fd8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 9 Apr 2019 19:50:59 -0400 Subject: [PATCH] configure_hotkeys: Avoid dialog memory leak within Configure() Without a parent, this dialog won't have its memory freed when it happens to get destroyed. --- src/citra_qt/configuration/configure_hotkeys.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/configuration/configure_hotkeys.cpp b/src/citra_qt/configuration/configure_hotkeys.cpp index 06447dc90..621a27849 100644 --- a/src/citra_qt/configuration/configure_hotkeys.cpp +++ b/src/citra_qt/configuration/configure_hotkeys.cpp @@ -78,10 +78,10 @@ void ConfigureHotkeys::Configure(QModelIndex index) { auto* const model = ui->hotkey_list->model(); const auto previous_key = model->data(index); - auto* const hotkey_dialog = new SequenceDialog; + SequenceDialog hotkey_dialog; - const int return_code = hotkey_dialog->exec(); - const auto key_sequence = hotkey_dialog->GetSequence(); + const int return_code = hotkey_dialog.exec(); + const auto key_sequence = hotkey_dialog.GetSequence(); if (return_code == QDialog::Rejected || key_sequence.isEmpty()) { return; }