mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-18 09:18:14 +00:00
static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues. Reference issue #4600.
This commit is contained in:
@@ -1590,11 +1590,13 @@ SDL_JoystickUpdate(void)
|
||||
|
||||
for (joystick = SDL_joysticks; joystick; joystick = joystick->next) {
|
||||
if (joystick->attached) {
|
||||
/* This should always be true, but seeing a crash in the wild...? */
|
||||
if (joystick->driver) {
|
||||
joystick->driver->Update(joystick);
|
||||
/* This driver should always be != NULL, but seeing a crash in the wild...? */
|
||||
if (!joystick->driver) {
|
||||
continue; /* nothing we can do, and other things use joystick->driver below here. */
|
||||
}
|
||||
|
||||
joystick->driver->Update(joystick);
|
||||
|
||||
if (joystick->delayed_guide_button) {
|
||||
SDL_GameControllerHandleDelayedGuideButton(joystick);
|
||||
}
|
||||
|
Reference in New Issue
Block a user