diff --git a/src/platform/qt/GBAKeyEditor.cpp b/src/platform/qt/GBAKeyEditor.cpp index f1ef98d61..4f479fbdc 100644 --- a/src/platform/qt/GBAKeyEditor.cpp +++ b/src/platform/qt/GBAKeyEditor.cpp @@ -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