From f9b1c960cb42f148512d77ef94e754245fd6af8a Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 20 Dec 2019 21:09:03 -0800 Subject: [PATCH] Qt: Fix crash when saving settings with no gamepad attached --- src/platform/qt/GBAKeyEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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