Qt: Fix crash when saving settings with no gamepad attached

This commit is contained in:
Vicki Pfau 2019-12-20 21:09:03 -08:00
parent 780b4521cf
commit f9b1c960cb
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ void GBAKeyEditor::save() {
m_controller->saveConfiguration(m_type);
#ifdef BUILD_SDL
if (m_profileSelect) {
if (m_profileSelect && m_profileSelect->count()) {
m_controller->setPreferredGamepad(m_type, m_profileSelect->currentIndex());
}
#endif