aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frontend/qt_sdl/InputConfigDialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/InputConfigDialog.cpp b/src/frontend/qt_sdl/InputConfigDialog.cpp
index 2c0afc4..81baa65 100644
--- a/src/frontend/qt_sdl/InputConfigDialog.cpp
+++ b/src/frontend/qt_sdl/InputConfigDialog.cpp
@@ -199,6 +199,9 @@ void InputConfigDialog::on_InputConfigDialog_rejected()
void InputConfigDialog::on_cbxJoystick_currentIndexChanged(int id)
{
+ // prevent a spurious change
+ if (ui->cbxJoystick->count() < 2) return;
+
Input::JoystickID = id;
Input::OpenJoystick();
}