mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crash when saving settings with no gamepad attached
This commit is contained in:
parent
780b4521cf
commit
f9b1c960cb
|
@ -231,7 +231,7 @@ void GBAKeyEditor::save() {
|
||||||
m_controller->saveConfiguration(m_type);
|
m_controller->saveConfiguration(m_type);
|
||||||
|
|
||||||
#ifdef BUILD_SDL
|
#ifdef BUILD_SDL
|
||||||
if (m_profileSelect) {
|
if (m_profileSelect && m_profileSelect->count()) {
|
||||||
m_controller->setPreferredGamepad(m_type, m_profileSelect->currentIndex());
|
m_controller->setPreferredGamepad(m_type, m_profileSelect->currentIndex());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue