VERY experimental Nintendo Switch 2 emulator
C++
configure_hotkeys: Avoid dialog memory leak within Configure()
Lioncash0a2bf1dc809e
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cppindex 7a09b66b4e..31347ce5a9 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;}