Qt: Fix crash when autobinding controller

Regression from #7016.
This commit is contained in:
Connor McLaughlin 2022-09-10 13:06:04 +10:00 committed by refractionpcsx2
parent 11d3326d73
commit 99f1ad0ea6
1 changed files with 4 additions and 2 deletions

View File

@ -225,8 +225,10 @@ void ControllerBindingWidget::doDeviceAutomaticBinding(const QString& device)
bool result;
if (m_dialog->isEditingGlobalSettings())
{
auto lock = Host::GetSettingsLock();
result = PAD::MapController(*Host::Internal::GetBaseSettingsLayer(), m_port_number, mapping);
{
auto lock = Host::GetSettingsLock();
result = PAD::MapController(*Host::Internal::GetBaseSettingsLayer(), m_port_number, mapping);
}
if (result)
Host::CommitBaseSettingChanges();
}