all repos — mgba @ f9b1c960cb42f148512d77ef94e754245fd6af8a

mGBA Game Boy Advance Emulator

Qt: Fix crash when saving settings with no gamepad attached
Vicki Pfau vi@endrift.com
Fri, 20 Dec 2019 21:09:03 -0800
commit

f9b1c960cb42f148512d77ef94e754245fd6af8a

parent

780b4521cf14abf3b76a47406b4de17ec3f0d9fb

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/GBAKeyEditor.cppsrc/platform/qt/GBAKeyEditor.cpp

@@ -231,7 +231,7 @@ bindKey(m_keyR, GBA_KEY_R);

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