Qt: Fix crash on clearing controller bindings

This commit is contained in:
Connor McLaughlin 2022-09-16 00:40:34 +10:00 committed by refractionpcsx2
parent 0f24048cd5
commit 324eb4d4bf
1 changed files with 4 additions and 2 deletions

View File

@ -197,8 +197,10 @@ void ControllerBindingWidget::onClearBindingsClicked()
if (m_dialog->isEditingGlobalSettings()) if (m_dialog->isEditingGlobalSettings())
{ {
auto lock = Host::GetSettingsLock(); {
PAD::ClearPortBindings(*Host::Internal::GetBaseSettingsLayer(), m_port_number); auto lock = Host::GetSettingsLock();
PAD::ClearPortBindings(*Host::Internal::GetBaseSettingsLayer(), m_port_number);
}
Host::CommitBaseSettingChanges(); Host::CommitBaseSettingChanges();
} }
else else