diff --git a/src/citra_qt/cheat_gui.cpp b/src/citra_qt/cheat_gui.cpp index d35268727..4cdc29ae5 100644 --- a/src/citra_qt/cheat_gui.cpp +++ b/src/citra_qt/cheat_gui.cpp @@ -190,7 +190,8 @@ QDialogEx::QDialogEx(QWidget *parent) : auto buttonCancel = new QPushButton(); buttonCancel->setText("Cancel"); connect(buttonOk, &QPushButton::released, this, [=]() { - if (typeSelect->currentIndex() == 0 && Common::Trim(nameblock->text().toStdString()).length() > 0) { + auto name = nameblock->text().toStdString(); + if (typeSelect->currentIndex() == 0 && Common::Trim(name).length() > 0) { return_value = std::make_shared(std::vector(), std::vector(), false, nameblock->text().toStdString()); } ui->close();