Gui: Fix pref pack apply crash (Fixes #6702)

This commit is contained in:
Chris Hennes
2022-04-02 13:19:57 -05:00
parent 65822ec2f8
commit 66d0c35dc7

View File

@@ -388,7 +388,7 @@ void DlgGeneralImp::recreatePreferencePackMenu()
ui->PreferencePacks->setItem(row, 1, kind);
auto button = new QPushButton(icon, tr("Apply"));
button->setToolTip(tr("Apply the %1 preference pack").arg(QString::fromStdString(pack.first)));
connect(button, &QPushButton::clicked, this, [this, &pack]() { onLoadPreferencePackClicked(pack.first); });
connect(button, &QPushButton::clicked, this, [this, pack]() { onLoadPreferencePackClicked(pack.first); });
ui->PreferencePacks->setCellWidget(row, 2, button);
++row;
}