From aff610154ce836128cc37179ccb4578af5a2eaf1 Mon Sep 17 00:00:00 2001 From: jmbaud Date: Sun, 28 Jul 2024 17:29:55 +0200 Subject: [PATCH] Don't try to update axis value or button state for unconnected joystick(s). --- src/gctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gctl.c b/src/gctl.c index 1a074e8..3930487 100644 --- a/src/gctl.c +++ b/src/gctl.c @@ -549,6 +549,9 @@ void GCtlUpdate( continue; sdljoystick = gc->sdljoystick[i]; + if(sdljoystick == NULL) + continue; + /* Update defined joystick operations for this joystick. * This is to tabulate a list of functions that were * handled/controlled by any of the joystick(s) so the