summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-09 19:50:59 -0400
committerLioncash <mathew1800@gmail.com>2019-04-09 20:05:57 -0400
commitb47c0c8a801c3e60467ad2a5890a9de0dc33f280 (patch)
treede5b69d31264842972ac3ce415ade09a7963c001 /src
parentdbf13f8169dc4ab84b97f27e26575375f3b51124 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_hotkeys.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp
index 7a09b66b4..31347ce5a 100644
--- a/src/yuzu/configuration/configure_hotkeys.cpp
+++ b/src/yuzu/configuration/configure_hotkeys.cpp
@@ -74,10 +74,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;
}